[Rd] R4.1: seq.POSIXt, tz="AEST" (PR#9572)

ripley at stats.ox.ac.uk ripley at stats.ox.ac.uk
Mon Mar 19 13:03:42 CET 2007


Hmm, AEST is not a valid time zone on Windows.
See ?as.POSIXlt for one of several places where this is documented.

But in any case, the underlying problem is in the OS, and we only try to 
work around it to the best of our knowledge (and that excludes 
undocumented time zones).


On Mon, 19 Mar 2007, felix at nfrac.org wrote:

> Times from seq.POSIXt come out wrong in AEST timezone around Feb 29 every
> leap year before 1970 (on Windows XP).
>
> According to help(DateTimeClasses), this is handled by "our own C code".
>
>> x <- as.POSIXct("1968-02-27") # tz="AEST"
>> x.gmt <- as.POSIXct("1968-02-27", tz="GMT")
>> data.frame(
>     GMT=seq(x.gmt, by="day", length=8),
>     byday=seq(x, by="day", length=8),
>     byDST=seq(x, by="DSTday", length=8))
>         GMT      byday      byDST
> 1 1968-02-27 1968-02-27 1968-02-27
> 2 1968-02-28 1968-02-28 1968-02-28
> 3 1968-02-29 1968-03-01 1968-03-02
> 4 1968-03-01 1968-03-02 1968-03-02
> 5 1968-03-02 1968-03-02 1968-03-02
> 6 1968-03-03 1968-03-03 1968-03-03
> 7 1968-03-04 1968-03-04 1968-03-04
> 8 1968-03-05 1968-03-05 1968-03-05
>
>> R.version
>               _
> platform       i386-pc-mingw32
> arch           i386
> os             mingw32
> system         i386, mingw32
> status
> major          2
> minor          4.1
> year           2006
> month          12
> day            18
> svn rev        40228
> language       R
> version.string R version 2.4.1 (2006-12-18)
>
>
>
>

-- 
Brian D. Ripley,                  ripley at 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



More information about the R-devel mailing list