[tz] tz Digest, Vol 132, Issue 8

Paul Eggert eggert at cs.ucla.edu
Mon Sep 12 05:15:04 UTC 2022


On 9/11/22 23:22, Vaibhav Shrivastava wrote:
> This case is Failing: (we have our custom batch to parse iana files).

I suggest modifying the custom batch script to do the equivalent of the 
following 'sed' command first thing:

sed 's/#.*//; /^[[:space:]]*$/d'

That is, remove all comments and empty lines. This might work around the 
bug in the script.

> Zone Africa/Sao_Tome 0:26:56 - LMT 1884
> #STDOFF -0:36:44.68
>                                                                      -->
> comment in the middle of rule
> -0:36:45 - LMT 1912 Jan 1 00:00u # Lisbon MT
> 0:00 - GMT 2018 Jan 1 01:00
> 1:00 - WAT 2019 Jan 1 02:00
> 0:00 - GMT


Surely the bug is more complicated than merely comments before a 
continuation line, as tzdata has had comments like that for decades. For 
example, something like the following has been in the 'europe' file 
since 1995.

   Zone    Europe/Athens   1:34:52 -       LMT     1895 Sep 14
                           1:34:52 -       AMT     1916 Jul 28 0:01 # 
Athens MT
                           2:00    Greece  EE%sT   1941 Apr 30
                           1:00    Greece  CE%sT   1944 Apr  4
                           2:00    Greece  EE%sT   1981
                           # Shanks & Pottenger say it switched to C-Eur 
in 1981;
                           # go with EU rules instead, since Greece 
joined Jan 1.
                           2:00    EU      EE%sT



More information about the tz mailing list