You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In fact timelocal accepts only 6 arguments. This works for most of the
date-times but not near the transition between daylight saving time and
normal time.
In the night when transition from normal to daylight saving time occurs,
the clock usually jumps from 02:00 AM and 03:00 AM. There is no 02:15 AM
on that day, for example.
On the other hand, in the night when transition from DST to normal time
occurs, the clock backs from 03:00 AM to 02:00 AM. A date-time like
02:15 AM occurs 2 times, once as a DST date-time hour and, one hour
later, as a normal date-time.
For these reasons, timelocal should accept a further argument that
specifies if the date-time specified by the other 6 arguments is a DST
date-time or not. Of course, this arguments is really needed only for
that special date-times that happen to occur 2 times during that single
night in a year. Other date-time values implicitly determine whether
they belong to the DST span or not, so the argument should be ignored.
The argument can be made optional for most date-times but needs to be
specified explicitely by the programmer for those special cases: how can
he otherwise specify if on that special night 02:15 AM is to be
interpreted as the 02:15 AM before or after the transition?
Furthermore, to identify those special times, the API should be extended
by a function that returns whether a given date-time is one of those
special values that occur 0 or 2 times and another function that, given
a year, returns the 0 values span and the 2 values span in the current
timezone.
I hope the concern has been clearly expressed. Of course, I'm at your
disposal for questions.
Migrated from rt.perl.org#1459 (status was 'resolved')
Searchable as RT1459$
The text was updated successfully, but these errors were encountered: