Re: [Rd] POSIXt oddness at end of 1969

2013-04-17 Thread peter dalgaard
Same thing happens on OS X. A bit of googling (did you know that Jimi Hendrix and the Band of Gypsies played at the Fillmore East on December 31, 1969?) reveals that the root issue is that mktime() returns -1 if the calendar time cannot be represented, which makes the case where the time _can_ b

[Rd] POSIXt oddness at end of 1969

2013-04-17 Thread William Dunlap
A user here noticed the following difference between Linux and Windows versions of R-2.15.3 (and R-3.0.0, I think) when using times within a second of the end of 1969: f <- function (sec = -1) { x1 <- as.POSIXct(c(2 * sec, sec, 0), origin = "1970-01-01", tz = "UTC") x2 <- as.POSIXlt(x1)