On Wed, Dec 10, 2008 at 10:43 AM, Jennifer Wang
(jennifwa)
<jennifwa@cisco.com> wrote:
Hello,
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