Hi, 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. cheers, Derick -- https://derickrethans.nl | https://xdebug.org | https://dram.io Like Xdebug? Consider a donation: https://xdebug.org/donate.php twitter: @derickr and @xdebug
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
On 1 March 2017 at 16:42, Brian Inglis <Brian.Inglis@systematicsw.ab.ca> wrote:
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
The above patch would be incorrect, though. It would be more correct to increase the allowed max abbreviation length. (Even better, numerical "abbreviations" like this should just be exempted from the caps, since they can technically be of almost any length, even though this is the longest they'll be in practice.) -- Tim Parenti
On Wed, 1 Mar 2017, Tim Parenti wrote:
On 1 March 2017 at 16:42, Brian Inglis <Brian.Inglis@systematicsw.ab.ca> wrote:
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
The above patch would be incorrect, though. It would be more correct to increase the allowed max abbreviation length. (Even better, numerical "abbreviations" like this should just be exempted from the caps, since they can technically be of almost any length, even though this is the longest they'll be in practice.)
The warning is there because of POSIX has a 6 char limit, so we can't just excempt that from the cap. cheers, Derick -- https://derickrethans.nl | https://xdebug.org | https://dram.io Like Xdebug? Consider a donation: https://xdebug.org/donate.php twitter: @derickr and @xdebug
The warning is there because of POSIX has a 6 char limit, so we can't just excempt that from the cap.
And Unicode is out, so -0444½ won't do.-) @dashdashado On Wed, Mar 1, 2017 at 5:03 PM, Derick Rethans <tz@derickrethans.nl> wrote:
On Wed, 1 Mar 2017, Tim Parenti wrote:
On 1 March 2017 at 16:42, Brian Inglis <Brian.Inglis@systematicsw.ab.ca> wrote:
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
The above patch would be incorrect, though. It would be more correct to increase the allowed max abbreviation length. (Even better, numerical "abbreviations" like this should just be exempted from the caps, since they can technically be of almost any length, even though this is the longest they'll be in practice.)
The warning is there because of POSIX has a 6 char limit, so we can't just excempt that from the cap.
cheers, Derick
-- https://derickrethans.nl | https://xdebug.org | https://dram.io Like Xdebug? Consider a donation: https://xdebug.org/donate.php twitter: @derickr and @xdebug
On 2017-03-01 14:48, Tim Parenti wrote:
On 1 March 2017 at 16:42, Brian Inglis wrote: 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 The above patch would be incorrect, though. It would be more correct to increase the allowed max abbreviation length. (Even better, numerical "abbreviations" like this should just be exempted from the caps, since they can technically be of almost any length, even though this is the longest they'll be in practice.)
POSIX limit in limits.h: http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap08.html#tag_... under TZ definition for std and dst (abbrs) "The interpretation of these fields is unspecified if either field is less than three bytes (except for the case when dst is missing), more than {TZNAME_MAX} bytes, or if they contain characters other than those specified." http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/limits.h.html#tag_1... "{_POSIX_TZNAME_MAX} Maximum number of bytes supported for the name of a timezone (not of the TZ variable). Value: 6" -- Take care. Thanks, Brian Inglis, Calgary, Alberta, Canada
Thanks for reporting the problem. For now let's work around it by changing the abbreviation to "MMT"; although "MMT" is not technically correct, I expect it's better than overrunning the POSIX limit. This prompted me to go back to old sources (wow, printed books!) to nail down Liberia's pre-1972 UT offset and the date of its 1972 transition to GMT. Proposed patch attached. It would be interesting to know where Liberia's -0:44:30 came from. There's not much of interest on that longitude line (equivalent to 11 degrees 7 minutes 30 seconds west).
participants (6)
-
Arthur David Olson -
Brian Inglis -
Brian Inglis -
Derick Rethans -
Paul Eggert -
Tim Parenti