[tz] tz abbr too long in 2017a Africa/Monrovia [was: zic throws warning for 2007a]

Brian Inglis Brian.Inglis at SystematicSw.ab.ca
Wed Mar 1 21:42:25 UTC 2017


On 2017-03-01 13:12, Derick Rethans wrote:
> I've just updated the PHP version of the TZ database, and while 
> compiling with the current zic, I see:
> warning: "standard input", line 434: time zone abbreviation has too many characters (-004430)
> This is because of:
>   24 #ifndef ZIC_MAX_ABBR_LEN_WO_WARN
>   25 #define ZIC_MAX_ABBR_LEN_WO_WARN    6
>   26 #endif /* !defined ZIC_MAX_ABBR_LEN_WO_WARN */
> 3108         if (cp - string > ZIC_MAX_ABBR_LEN_WO_WARN)
> 3109           mp = _("time zone abbreviation has too many characters");
> That check was introduced in 2012j as per NEWS:
> Release 2012j - 2012-11-12 18:34:49 -0800
> ...
>   zic -v now complains about abbreviations that are less than 3
>   or more than 6 characters, as per Posix.  Formerly, it checked
>   for abbreviations that were more than 3.

Seems the problem is only in: 

$ egrep -n '^[^#]*[-+]?[0-9]{5,6}' tz/releases/tzdata*/[aefns]*[aey]
tz/releases/tzdata2017a/africa:434:                     -0:44:30 -      -004430 1972 May
$ awk 'BEGIN{RS="";FS="\n"};/\n[^#]*[-+]?[0-9]{5,6}/' tz/releases/tzdata2017a/africa
# Liberia
# From Paul Eggert (2006-03-22):
# In 1972 Liberia was the last country to switch
# from a UTC offset that was not a multiple of 15 or 20 minutes.
# Howse reports that it was in honor of their president's birthday.
# Shank & Pottenger report the date as May 1, whereas Howse reports Jan;
# go with Shanks & Pottenger.
# For Liberia before 1972, Shanks & Pottenger report -0:44, whereas Howse and
# Whitman each report -0:44:30; go with the more precise figure.
# Zone  NAME            GMTOFF  RULES   FORMAT  [UNTIL]
Zone    Africa/Monrovia -0:43:08 -      LMT     1882
                        -0:43:08 -      MMT     1919 Mar # Monrovia Mean Time
                        -0:44:30 -      -004430 1972 May
                         0:00   -       GMT
$ zic -vd /usr/local/share/zoneinfo/ tz/releases/tzdata2017a/africa
warning: "tz/releases/tzdata2017a/africa", line 434: time zone abbreviation has too many characters (-004430)
$ zdump -iV /usr/local/share/zoneinfo/Africa/Monrovia

TZ="/usr/local/share/zoneinfo/Africa/Monrovia"
-       -       -00:43:08       LMT
1882-01-01      00      -00:43:08       MMT
1919-02-28      23:58:38        -00:44:30       "-004430"
1972-05-01      00:44:30        +00     GMT

Looks like it stores the over long abbreviation.
So should probably patch:

--- tz/releases/tzdata2017a/africa	2017-02-23 00:37:19.000000000 -0700
+++ tz/releases/tzdata2017b/africa	2017-03-01 14:36:43.479882200 -0700
@@ -431,7 +431,7 @@ Link Africa/Nairobi Indian/Mayotte
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone	Africa/Monrovia	-0:43:08 -	LMT	1882
 			-0:43:08 -	MMT	1919 Mar # Monrovia Mean Time
-			-0:44:30 -	-004430	1972 May
+			-0:44:30 -	-0044	1972 May
 			 0:00	-	GMT

-- 
Take care. Thanks, Brian Inglis, Calgary, Alberta, Canada



More information about the tz mailing list