[R] as.POSIXct before and after 1970

Omar Lakkis uofiowa at gmail.com
Mon Oct 17 18:16:35 CEST 2005


Can someone, please, explain the difference in as.POSIXct results
before 1970 and on and after 1970 as illustrated below.

After 1970, the use of 'EST' or "EST+5EDT' as the timezone does not
affect the result of asPOSIXct, but before 1970 on 10/28 the results
are different.

> as.POSIXct('1970-10-29', tz='EST')+1
[1] "1970-10-29 00:00:01 EST"
> as.POSIXct('1970-10-29', tz='EST+5EDT')+1
[1] "1970-10-29 00:00:01 EST"

> as.POSIXct('1969-10-29', tz='EST')+1
[1] "1969-10-29 00:00:01 EST"
> as.POSIXct('1969-10-29', tz='EST+5EDT')+1
[1] "1969-10-28 23:00:01 EST"




More information about the R-help mailing list