google / cctz

CCTZ is a C++ library for translating between absolute and civil times using the rules of a time zone.
Apache License 2.0
597 stars 166 forks source link

Extend transitions for a full 400 years #267

Closed devbww closed 1 year ago

devbww commented 1 year ago

2022g introduced a new zone, America/Ciudad_Juarez, whose "-b slim" form ends in a year (2022) with three transitions, and which therefore cannot fully match the POSIX TZ string used to handle instants after the last transition.

Previously we assumed that the last-year's transitions would match those generated by the POSIX string. In this case that meant we claimed there was an extra transition in any future year equivalent to (2022 mod 400).

So, extend the transitions using the POSIX string for a full 400 years, instead of 399.