Skip to content
Back to formatted view

Raw Message

Message-ID: <f3dcf28e-83ab-4350-a98a-e51a3f43fe59@email.android.com>
Date: 2012-12-06T14:54:38Z
From: Jeff Newmiller
Subject: Incorrect DST time changes in DateTimeClasses
In-Reply-To: <2A4CFB23-88F8-4315-AFD2-2B579828A215@mac.com>

What OS are you using? It makes a difference.
---------------------------------------------------------------------------
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.