[Rd] POSIX problem in New Zealand (PR#2570)

arnima@u.washington.edu arnima@u.washington.edu
Fri Feb 21 06:56:03 2003

Full_Name: Arni Magnusson
Version: 1.6.2
OS: Windows XP
Submission from: (NULL) (

Hi there. I'm experiencing unexpected behaviour from as.POSIXct:

> as.POSIXct("1969-12-24")
[1] "1969-12-23 23:00:00 New Zealand Standard Time"
> as.POSIXlt("1969-12-24")
[1] "1969-12-24"
> as.POSIXlt("1969-12-24")+1
[1] "1969-12-23 23:00:01 New Zealand Standard Time"

My friend on the US West Coast tells me he has not encountered this problem.
I've read some of the glibc discussion, but I believe that's not relevant for
Windows XP. I also read that tz="GMT" could circumvent some problems, but not

> as.POSIXct("1969-12-24 12:00:00", "GMT")
[1] "1969-12-25 New Zealand Standard Time"

If I can get around this problem, I'd prefer using POSIX rather than the date or
chron classes. Perhaps a Windows environment variable is the key?

Thanks in advance,