[R] POSIXlt and daylight savings time
Karl Ove Hufthammer
karl at huftis.org
Wed Sep 5 22:01:47 CEST 2012
pdb wrote:
>> as.POSIXlt('2004-10-31 02:00:00')
> [1] "2004-10-31"
>> as.POSIXlt('2004-10-31 03:00:00')
> [1] "2004-10-31 03:00:00"
>
> How do I tell as.POSIXlt() to ignore daylight savings and just convert to
> a time as is? I've read about the 'isdst' but it is still unclear what to
> do.
There *was* no 02:00:00 in your local timezone, so you’re trying to specifiy
a point in time that just didn’t exist. If you really want to do this, use
the UTC timezone, by setting the ‘tz’ argument in as.POSIXct/as.POSIXlt to
UTC (or GMT).
--
Karl Ove Hufthammer
E-mail: karl at huftis.org
Jabber: huftis at jabber.no
More information about the R-help
mailing list