Alpha 2
This is an internal development file. It should NOT be included in any SMF
distribution packages.
This file exists to make it easier for devs to update Sources/TimeZone.php
and Languages/en_US/Timezone.php when a new version of the IANA's time zone
database is released.
Run this file from the command line in order to perform the update, then
review any changes manually before committing.
In particular, review the following:
-
If new $txt or $tztxt strings were added to the language file, check that
they are spelled correctly and make sense.
-
If the TZDB added an entirely new time zone, a new chunk of fallback code
will be added to TimeZone::$fallbacks, with an "ADD INFO HERE" comment
above it.
- Replace "ADD INFO HERE" with something meaningful before committing,
such as a comment about when the new time zone was added to the TZDB
and which existing time zone it diverged from. This info can be found
at https://data.iana.org/time-zones/tzdb/NEWS.
-
When this script suggests a fallback tzid in the fallback code, it will
insert an "OPTIONS" comment above that suggestion listing other tzids that
could be used instead.
-
If you like the automatically suggested tzid, just delete the comment.
-
If you prefer one of the other options, change the suggested tzid to
that other option, and then delete the comment.
-
All "OPTIONS" comments should be removed before committing.
-
Newly created time zones are also appended to their country's list in the
TimeZone::$sorted_tzids array.
- Adjust the position of the new tzid in that list by comparing the
city's population with the populations of the other listed cities.
A quick Google or Wikipedia search is your friend here.
-
If a new "meta-zone" is required, new entries for it will be added to
TimeZone::$metazones and to the $tztxt array in the language file.
-
The new entry in TimeZone::$metazones will have an "OPTIONS" comment
listing all the tzids in this new meta-zone. Feel free to use any of
them as the representative tzid for the meta-zone. All "OPTIONS"
comments should be removed before committing.
-
Also feel free to edit the $tztxt key for the new meta-zone. Just make
sure to use the same key in both files.
-
The value of the $tztxt string in the language file will probably need
to be changed, because only a human can know what it should really be.