[R] as.POSIXct problem?

Peter Dalgaard BSA p.dalgaard at biostat.ku.dk
Fri Jan 3 20:13:02 CET 2003


Frank E Harrell Jr <fharrell at virginia.edu> writes:

 
> I get NA for any day in 1969 or earlier.  Using a time other than midnight did not help.  So it's not a problem with time zone changes on a given day (thanks, Brian and Don for suggesting I look at that).
> 
> Doing as.POSIXlt works fine, but I want POSIXct variables for storage in data frames.
> 
> I am at a loss on how to proceed but thanks to all for the help.

Not much consolation, I know, but I can confirm this with RedHat 8.0.
Also:

> as.POSIXct(as.POSIXlt(ISOdate(1969,10,10)))
[1] NA

However, with SuSE and 1.6.0, I see

> as.POSIXct(as.POSIXlt(ISOdate(1969,10,10)))
[1] "1969-10-10 13:00:00 CET"

So it looks like a difference between glibc 2.2.5 and 2.2.93. Sigh...

-- 
   O__  ---- Peter Dalgaard             Blegdamsvej 3  
  c/ /'_ --- Dept. of Biostatistics     2200 Cph. N   
 (*) \(*) -- University of Copenhagen   Denmark      Ph: (+45) 35327918
~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk)             FAX: (+45) 35327907




More information about the R-help mailing list