Meaning of 'goforward' flag ?

John Dlugosz JDlugosz at
Tue Jan 13 21:40:22 UTC 2009

I think I understand how the ats array is extrapolated to dates beyond
its end.  The Gregorian calendar repeats every 400 years, so any rules
based on weekdays and day of month numbers will have results that
repeat.  So, if the date is beyond the end of the array, subtract the
smallest multiple of 400 years that produces a date that is within the
array, and use the ttis entry that points to.

This assumes that the last set of rules in force were used to generate
at least 400 years of entries in ats.  

Is that correct?

But, the code to set goforward based on the ats array decides TRUE if
there exists an entry that is equivalent to the last entry but exactly
400 years earlier.

That does not guarantee that the last 400 years was meant to be
repeated.  I'm guessing that zic fills out a whole cycle of the last set
of rules in force and then one more ats entry to serve as a cue for
tzload, or that the POSIX string could generate more than one complete
cycle (i.e. MAX_TIMES was large enough).  But simply setting a flag in
the header, or noting that the POSIX string existed and could fill out
400 years, would be clearer and avoid hidden meanings.  As it is, zic
would have to be careful to avoid letting that cue occur by

If you don't worry about that happening, why worry about 'goback', which
never occurs in the actual data?  Any newly minted time zone would
inherit the past from the region is split off from, so it never will.


More information about the tz mailing list