doc-en icon indicating copy to clipboard operation
doc-en copied to clipboard

Timezones have no changelog and no overview for exists aliases

Open Daijobou opened this issue 3 years ago • 3 comments

From manual page: https://php.net/timezones.europe


Sometimes between php 8.1.4 and 8.1.12 "Europe/Kiev" was renamed to "Europe/Kyiv".

  1. Such name changes should be noted there. Keyword changelog
  2. There are aliases like "Europe/Kiev" and not listet. Please show aliases too.

Problem with renaming exists values here is, that ext/intl-functions (like IntlDateFormatter()) don't know "Europe/Kyiv" and throw now a error "datefmt_create: No such time zone: 'Europe/Kyiv': U_ILLEGAL_ARGUMENT_ERROR"

No linux system official supports icu version 72. Who makes such unnecessary renaming, when its a change that breaks things. Instead, it (Kyiv) could have been introduced as an alias. :(

Daijobou avatar Nov 15 '22 15:11 Daijobou

  1. Such name changes should be noted there. Keyword changelog

I agree that we should maintain a changelog for the supported timezones. @derickr, would that be suitable (since that page is auto-generated)?

2. There are aliases like "Europe/Kiev" and not listet. Please show aliases too.

These are already listed on https://www.php.net/manual/en/timezones.others.php.

Problem with renaming exists values here is, that ext/intl-functions

The timezones listed for ext/date are not necessarily supported by ext/intl; although both extensions use the same timezone database, they may use different versions of it. Probably something we should point out in the PHP manual.

Who makes such unnecessary renaming,

https://www.iana.org/time-zones

cmb69 avatar Nov 15 '22 17:11 cmb69

I agree that we should maintain a changelog for the supported timezones. @derickr, would that be suitable (since that page is auto-generated)?

Not really. The IANA timezone database never removes these identifiers, and only adds new ones. Europe/Kyiv was added recently, with the existing Europe/Kiev still available, and working as before.

I don't have a list on which ID was introduced, and as some distributions don't even use the built-in database, but rely on the Operating System, this list can not be relied on in any case.

Instead, it (Kyiv) could have been introduced as an alias. :-(

It was.

derickr avatar Nov 15 '22 18:11 derickr

and as some distributions don't even use the built-in database, but rely on the Operating System, this list can not be relied on in any case.

Ah, right! Then we should probably adapt:

https://github.com/php/doc-en/blob/215fd48515e0793760b2079fff8380c629e11b3f/language-snippets.ent#L1351-L1357

cmb69 avatar Nov 15 '22 18:11 cmb69

No, the distributions deliberately patch this against our specific request. If they insist on not following recommendations and (IMO) break this, then that is their problem. Our documentation is correct for our GIT repository's PHP versions and code.

Our documentation FWIW, also documents the "backwards compatible" zones on a set page.

derickr avatar Jan 10 '23 15:01 derickr