[R] ISOdate returns incorrect date?
Heiko Schaefer
heiko.schaefer at swissrisk.com
Wed Nov 19 17:20:56 CET 2003
Does this really work for you? I still get:
> ISOdate(1900,6,16)
[1] "1900-06-15 14:00:00 Westeuropäische Sommerzeit"
> ISOdate(1900,6,16,tz="")
[1] "1900-06-15 12:00:00 Westeuropäische Sommerzeit"
Obviously the time son influences the time, but it can
Not possibly account for the difference of a full day?!
Still puzzled...
Heiko
-----Original Message-----
From: Gabor Grothendieck [mailto:ggrothendieck at myway.com]
Sent: Mittwoch, 19. November 2003 17:06
To: heiko.schaefer at swissrisk.com; r-help at stat.math.ethz.ch
Subject: RE: [R] ISOdate returns incorrect date?
ISOdate works, by default, in the GMT timezone. Try:
ISOdate(1900,6,16,tz="")
ISOdate(1950,6,16,tz="")
If you don't need timezones and don't want to worry about them
you can alternately use the chron library for your dates and
times.
---
Date: Wed, 19 Nov 2003 14:58:24 +0100
From: Heiko Schaefer <heiko.schaefer at swissrisk.com>
To: <r-help at stat.math.ethz.ch>
Subject: [R] ISOdate returns incorrect date?
Dear all,
I have found the following (for me) incomprehensible behaviour of
ISOdate (POSIXct):
> ISOdate(1900,6,16)
[1] "1900-06-15 14:00:00 Westeuropäische Sommerzeit"
> ISOdate(1950,6,16)
[1] "1950-06-16 14:00:00 Westeuropäische Sommerzeit"
Note that in the first case I get the 15th of June back, not the 16th as
I would have expected!
This happened under R-1.7.1 on both windows and linux.
I would greatly appreciate your comments,
Heiko
______________________________________________
R-help at stat.math.ethz.ch mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help
More information about the R-help
mailing list