time during standard to DST transition

Jennifer Wang (jennifwa) jennifwa at cisco.com
Thu Dec 11 18:56:42 UTC 2008

I think in most case when a caller sets the time to 2:10am Mar 8, 2009
in America/Los_Angeles, he does not realize it's the "missing hour".  If
he wants 1:10am  (which is a valid time), he would use that.  So moving
forward to 3:10am seems to make sense.
There are also other code such as normalize_overflow() where we make
adjustments to what caller wants.


From: Scott Atwood [mailto:scott.roy.atwood at gmail.com] 
Sent: Wednesday, December 10, 2008 11:26 AM
To: tz at elsie.nci.nih.gov; Jennifer Wang (jennifwa)
Subject: Re: time during standard to DST transition

On Wed, Dec 10, 2008 at 10:43 AM, Jennifer Wang (jennifwa)
<jennifwa at cisco.com> wrote:

	We ran into a problem when setting time to the "missing hour"
during transition from standard time to DST time.  For example, setting
time to Mar 8, 2009 at 2:10am using America/Los_Angeles time zone
results in error.  
	Should mktime() skip forward in this case and set the time to
Mar 8, 2009 3:10am?

To me, it seems to make sense to return an error.  The time 2:10am Mar
8, 2009 in America/Los_Angeles really is an ambiguous time.  You can't
determine the intension of the caller.  She could either be counting
forward one hour from 1:10am, or she could be counting back one hour
from 3:10am, which result in different answers.  Likewise, calling
mktime() with 2:10am, Nov 2, 2008 in America/Los_Angeles and a negative
value of tm_isdst is similarly ambiguous.

I think both of these cases should return an error.


Scott Atwood

Cycle tracks will abound in Utopia.  ~H.G. Wells

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mm.icann.org/pipermail/tz/attachments/20081211/ff8bbaaf/attachment-0001.html 

More information about the tz mailing list