1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-31 22:04:40 +03:00

Semi-automatically detect changes in timezone abbreviations.

Add an option to zic.c to dump out all non-obsolete timezone abbreviations
defined in the Olson database.  Comparing this list to its previous state
will clue us in when something happens that we may need to account for in
the tznames/ time zone abbreviation lists.  The README file's previous
exhortation to "just grep for differences" was completely useless advice,
in my now-considerable experience; but maybe this will be a bit more
useful.  As a starting point I built the same list from the tzdata files
as they existed in 2006, which is committed here as known_abbrevs.txt.
Comparison indeed turned up quite a few changes we had neglected to account
for, which I will commit separately.
This commit is contained in:
Tom Lane
2013-03-23 18:47:22 -04:00
parent b7f8465cc6
commit 6960277270
5 changed files with 241 additions and 8 deletions

View File

@ -22,11 +22,17 @@ Since time zone rules change frequently in some parts of the world,
we should endeavor to update the data files before each PostgreSQL
release.
At each update, we should check if time zone offsets have changed.
Just search for the current or previous year and see what has changed.
Sometimes a country changes its time zone offsets, for example Georgia
in 2004. Just grepping in the zic database files for 2004 is enough to
spot such a change. Then the files under tznames/ should be updated.
While the files under data/ can just be duplicated when updating, manual
effort is needed to update the time zone abbreviation lists under tznames/.
These need to be changed whenever new abbreviations are invented or the
UTC offset associated with an existing abbreviation changes. To detect
if this has happened, after installing new files under data/ do
gmake abbrevs.txt
which will produce a file showing all abbreviations that are in current
use according to the data/ files. Compare this to known_abbrevs.txt,
which is the list that existed last time the tznames/ files were updated.
Update tznames/ as seems appropriate, then replace known_abbrevs.txt
in the same commit.
When there has been a new release of Windows (probably including Service
Packs), the list of matching timezones need to be updated. Run the