[tz] [Patch] Make it slightly easier to parse tzdata
eggert at cs.ucla.edu
Fri Oct 31 20:18:01 UTC 2014
On 10/31/2014 07:56 AM, Ed Schouten wrote:
> there is a very small number of directives that would require quite a
> lot of additional code to parse properly. For example, "lastSun" makes
> a lot of sense as a special keyword in "Rule" directives, but it
> provides no functional gain in "Zone" directives.
> The same holds for the use of the "Dec 29 24:00" time used in Samoa's
> timezone. We should be able to use "Dec 30" instead, right?
We could, but if the original announcement said the equivalent of "Dec
29 24:00" it's helpful if the corresponding zone line matches the
announcement. Similarly, if the Zone transition is supposed to be at
the same time and date as a Rule transition, it simplifies maintenance a
bit to use the same string for both.
As I understand it, in zic the same code is used to parse dates
regardless of whether they appear in Rule or Zone lines. I assume the
same thing could be done in a Python parser....
More information about the tz