March 8, 2005
6:44 p.m.
The Gregorian calendar cycles every 400 years: January 1 fell on a [Saturday] in 2000, and will do so again in 2400. In a traditional-zic approach, we could store 400 (or more) years worth of future transitions; stuff beyond that could be handled at run time. For example, a localtime call would, for far future times: cast out 400 years worth of seconds at a time to get to the near future (remembering how many years worth of seconds had been cast out); convert the resulting time_t value; and add the cast-off number of years to the resulting time_t value. We'd of course need to check at run time to verify that this was the right approach. --ado