Re: [R] as.POSIXct before and after 1970

From: Prof Brian Ripley <ripley_at_stats.ox.ac.uk>
Date: Tue 18 Oct 2005 - 04:06:25 EST

Your OS is? I cannot reproduce this on any of mine.

Sone OSes do not support dates before 1970, which would explain the difference. R then has to guess when summer time ended in 1969, and I suspect something is happening inconsistently.

Also, "EST" is not a real-world POSIX timezone and may well not be implemented fully.

On Mon, 17 Oct 2005, Omar Lakkis wrote:

> 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"
>
> ______________________________________________
> R-help@stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
>

-- 
Brian D. Ripley,                  ripley@stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595

______________________________________________
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Received on Tue Oct 18 04:11:20 2005

This archive was generated by hypermail 2.1.8 : Sun 23 Oct 2005 - 19:00:36 EST