[R] Incorrect DST time changes in DateTimeClasses
Andrew Digby
andrewdigby at mac.com
Thu Dec 6 20:35:21 CET 2012
Apologies - I intended to add that info at the end: OS X 10.8.2 and R 2.15.1.
Many thanks.
> R.Version()
$platform
[1] "x86_64-apple-darwin9.8.0"
$arch
[1] "x86_64"
$os
[1] "darwin9.8.0"
$system
[1] "x86_64, darwin9.8.0"
$status
[1] ""
$major
[1] "2"
$minor
[1] "15.1"
$year
[1] "2012"
$month
[1] "06"
$day
[1] "22"
$`svn rev`
[1] "59600"
$language
[1] "R"
$version.string
[1] "R version 2.15.1 (2012-06-22)"
$nickname
[1] "Roasted Marshmallows"
On 7/12/2012, at 04:29 , Uwe Ligges <ligges at statistik.tu-dortmund.de> wrote:
>
>
> On 06.12.2012 15:54, Jeff Newmiller wrote:
>> What OS are you using? It makes a difference.
>
> ... and R version.
>
> Uwe Ligges
>
>> ---------------------------------------------------------------------------
>> Jeff Newmiller The ..... ..... Go Live...
>> DCN:<jdnewmil at dcn.davis.ca.us> Basics: ##.#. ##.#. Live Go...
>> Live: OO#.. Dead: OO#.. Playing
>> Research Engineer (Solar/Batteries O.O#. #.O#. with
>> /Software/Embedded Controllers) .OO#. .OO#. rocks...1k
>> ---------------------------------------------------------------------------
>> Sent from my phone. Please excuse my brevity.
>>
>> Andrew Digby <andrewdigby at mac.com> wrote:
>>
>>>
>>> Can anyone please shed any light on why R DateTimeClasses give weird
>>> times for when daylight saving time information changes, and which
>>> aren't consistent with the OS?
>>>
>>> Example:
>>>
>>> Expected result: in New Zealand DST stopped (NZDT -> NZST) at 03:00
>>> NZDT on 2010-04-04, as confirmed by the OS time zone info (OS X
>>> 10.8.2):
>>>
>>> zdump -v /etc/localtime
>>> /etc/localtime Sat Apr 3 13:59:59 2010 UTC = Sun Apr 4 02:59:59
>>> 2010 NZDT isdst=1
>>> /etc/localtime Sat Apr 3 14:00:00 2010 UTC = Sun Apr 4 02:00:00
>>> 2010 NZST isdst=0
>>>
>>> Result in R: R has DST changing at 02:26:08, instead of 03:00!
>>>
>>> > a<-as.POSIXlt('2010-04-04 02:26:07',tz="NZ")
>>> > a$isdst
>>> [1] 1
>>> > b<-as.POSIXlt('2010-04-04 02:26:08',tz="NZ")
>>> > b$isdst
>>> [1] 0
>>>
>>>
>>> So does R get its DST information from somewhere else? Any suggestions
>>> would be much appreciated!
>>>
>>> Thanks
>>>
>>> [[alternative HTML version deleted]]
>>>
>>> ______________________________________________
>>> R-help at r-project.org mailing list
>>> https://stat.ethz.ch/mailman/listinfo/r-help
>>> PLEASE do read the posting guide
>>> http://www.R-project.org/posting-guide.html
>>> and provide commented, minimal, self-contained, reproducible code.
>>
>> ______________________________________________
>> R-help at r-project.org mailing list
>> https://stat.ethz.ch/mailman/listinfo/r-help
>> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
>> and provide commented, minimal, self-contained, reproducible code.
>>
More information about the R-help
mailing list