[tz] Reason for removal of several TZ
Derick Rethans
tz at derickrethans.nl
Mon Dec 4 10:30:14 UTC 2017
On Sun, 3 Dec 2017, Paul Eggert wrote:
> Thomas M Steenholdt wrote:
> > From what I've seen, PHP (on Ubuntu) had some hiccups and started
> > mentioning Sao Paolo in my date/time outputs, because WGT/WGST was
> > suddenly missing:
>
> As I understand from
> <https://bugs.launchpad.net/ubuntu/+source/tzdata/+bug/1734967>, PHP attempts
> to guess the tzdb Zone name (e.g., "Europe/Berlin") from the abbreviation and
> UT offset, which is the sort of thing that we have long explicitly warned
> should not be done because abbreviations are ambiguous.
PHP does not guess tzdb names from abbreviations/UT offsets by default,
it hasn't since 2011 (PHP 5.5):
https://github.com/php/php-src/commit/37d1038958a6442de8f559a443f117c6ae1c2d78
There are still functions to guess the timezone from abbreviation +
offset, but that is a developers choice:
http://php.net/manual/en/function.timezone-name-from-abbr.php I'll go
add a warning to the docs defining it as "deprecated".
Input routines (strtotime()) also still allow the use of abbreviations
where they are defined in tzdata, in which case the are statically
mapped to tzdb names:
https://github.com/php/php-src/blob/master/ext/date/lib/fallbackmap.h —
which has not changed to keep backwards compatibility (VET is still
wrong in it, for example).
cheers,
Derick
More information about the tz
mailing list