Does any one remember the logic behind sp->goback and sp->goahead in localtime.c?
Olson, Arthur David (NIH/NCI) [E]
olsona at dc37a.nci.nih.gov
Tue Jan 15 18:06:21 UTC 2008
The goahead and goback logic did indeed get added when work was being
done on supporting 64-bit time_t values.
On 64-bit time_t systems, even when time zone data files don't contain
800 explicit transitions, the files may contain a POSIX environment
variable value from which transitions can be determined; the zone
loading software will fill in transition tables using the environment
variable value, and the goahead and goback logic will kick in.
The logic handles current real-world cases; it could be improved. Recall
the effort a few years ago to extend daylight saving time on the Pacific
coast of the United States during election years (as a way of reducing
the impact of reported east coast voting on west coast voting). If the
extension had been adopted, there'd still be a 400-year cycle of
transitions, but there might be more than 800 transitions in the cycle
(in particular, every four years the Pacific coast might move through
"Pacific Daylight Time" and then "Pacific Presidential Election Time"
and then "Pacific Standard Time." (Were this true, there'd be no
POSIX-style variable that could describe the transitions.) So goahead
should really be set by searching the table to see if there's a
transition that's exactly 400 years before the last transition in the
table with a type that's the same as that of the last transition in the
table (and similarly for goback).
More information about the tz