[R-sig-DB] RPostgreSQL driver timestamp data type mapping
Sebastian P. Luque
@p|uque @end|ng |rom gm@||@com
Wed Jan 13 12:47:03 CET 2010
On Wed, 13 Jan 2010 07:09:57 +0000 (GMT),
Prof Brian Ripley <ripley-+7o2aNKnwVPQzY9nttDBhA using public.gmane.org> wrote:
[...]
> Not really: POSIXct times are absolute times: it is when they are
> displayed that you see the locale. So just add a tzone attribute to
> the result, as in
> > x <- Sys.time()
> > x
> [1] "2010-01-13 07:07:26 GMT"
> > attr(x, "tzone") <- "PST8DST"
> > x
> [1] "2010-01-12 23:07:26 PST"
> > attr(x, "tzone") <- NULL
> > x
> [1] "2010-01-13 07:07:26 GMT"
Does setting tzone=NULL have the same effect as setting it to "GMT", in
that daylight savings are no longer relevant? This is the only reason I
wanted to set it "GMT", and avoid daylight savings issues that I don't
need to deal with. Usually I do this starting from a character vector,
as in:
as.POSIXct(strptime("2010-01-13 01:00:00", "%Y-%m-%d %H:%M:%S), tz="GMT")
Thanks,
--
Seb
More information about the R-sig-DB
mailing list