FW: glibc, Linux: about the time zone transition values in th e lo calt ime file

Fei Yuming-CYF001 Yuming.Fei at motorola.com
Thu Feb 3 17:44:08 UTC 2005

Thank you all for the responses.

Markus exactly explained the why.

(In my application, I needed to get the local-broken-down-time format
of the transition time point, but do NOT apply the STD/DST transition to it. 
The one mentioned in my previous email is the result that the DST
transition has been applied to it, which was my fault. I figured out a
way to fix it and get the right result.)


-----Original Message-----
From: Markus Kuhn [mailto:Markus.Kuhn at cl.cam.ac.uk]
Sent: Thursday, February 03, 2005 11:04 AM
To: Fei Yuming-CYF001
Cc: tz at elsie.nci.nih.gov
Subject: Re: FW: glibc, Linux: about the time zone transition values in
the lo calt ime file 

"Olson, Arthur David (NIH/NCI)" wrote on 2005-02-03 13:57 UTC:
Fei Yuming <Yuming.Fei at motorola.com> wrote:
> On Linux systems, it seems that the transitions stored in the localtime file
> are not the current time to start the transition, but the new local current
> time right after the transition.

The following might help to clarify what I suspect you might got
confused about:

The transition times are stored in the "Seconds Since The Epoch
(time_t)" time scale, which itself (like UTC) has *no* DST transitions.

The effect you observed occured only *after* the application of the
time_t->local-broken-down-time conversion, which you applied to convert
the time_t value back into a human-consumable local-time yyyy-mm-dd
hh:mm:ss display.

It is only natural, that the transition time point itself is displayed
using the same convention as the time point immediately afterwards.

[By the way: This is for the same reason for which most digital clocks
show 00:00 and not 24:00 at the midnight transition. Note that 24:00
would be valid only for the infinitesimal point in time at exactly
midnight (and therefore invisible to the human eye), whereas 00:00 is a
valid truncation until 00:01 is reached. Therefore, we use the
backwards-looking notation 24:00 only when we refer to the end of a time
interval (as in tonight 22:00-24:00), but not when we refer to the
current time (as in "It is now 00:00.").]


Markus Kuhn, Computer Lab, Univ of Cambridge, GB
http://www.cl.cam.ac.uk/~mgk25/ | __oo_O..O_oo__

More information about the tz mailing list