FW: tztab entries (forwarded with permission)
eggert at twinsun.com
Tue Aug 12 23:41:34 UTC 1997
From: Dave Kelly[SMTP:dkelly at lhr-sys.DHL.COM]
Date: Monday, August 11, 1997 2:30 PM
We decided to use the HP-UX timezone name from the tztab file as a
reference to a timezone since it seemed as good as anything else.
We have now realised that the entries we have as default in tztab
are far from complete.
Do you know where we could get hold of a tztab file which has
a complete list of entries?
I don't know the HP-UX tztab scheme. However, I do know the Olson tz
scheme, which is available on most recent Unix hosts (BSD, Linux, SGI,
Sun) and I understand that HP-UX now has (optional?) support for the
Olson tz scheme in /opt/dce/lib/zoneinfo. The Olson tz scheme is
fairly complete for time zone histories after 1970.
We do not want to maintain multiple tztab entries for countries
which use the same zone - i.e. we want to have a single entry for
all the countries which use CET/CEST.
Here's what I think you're asking for. If you're interested only in
times now and in the future, then the Olson database contains too many
names, partly because it goes back to 1970 and thus must track
historical changes, and partly because it insists on at least one name
per country. You want just one distinct name for each time zone
future, regardless of country.
In that case, what you need is a way to look at the Olson database,
find all the distinct time zone futures in it (starting with 1997, say),
and choose a canonical name for each distinct future.
Choosing the canonical name requires human judgment, but the rest of
this task can be done automatically. Here's a shell script that does
the automatic part; it assumes the existence of an `md5' command that
prints a checksum, but you can substitute your own checksum command if
you don't have md5. This script assumes that the only thing that
matters about a time zone is its UTC offset; it ignores the time zone
name (e.g. "EST", "EDT") and whether the time is daylight-saving time.
Also, watch out for a bug in the script: it thinks Asia/Hong_Kong
differs from Asia/Shanghai because Hong Kong's time zone abbrevation
changed from HKT to CST when it reverted to China last month (and
similarly for Macao in 1999).
TZs=`cd $TZDIR && find [A-Z]* -type f -print | sort`
if ('$thisYear'<=$6) print $3, $4, $5, $6, $10, $11, $12, $13
for TZ in $TZs
do echo "`zdump -v $TZDIR/$TZ | awk "$selectZdumpInfo" | md5` $TZ"
checksum = $1
TZ = $2
if (checksum != oldChecksum) print ""
oldChecksum = checksum
This script outputs a series of TZ groups, each group preceded by an
empty line, and each group consisting of one or more lines specifying
a TZ value. All the TZ values in a group have the same UTC offset
from this year on.
I ran this program on the latest TZ data. The output started like this:
That is, Asia/Alma-Ata has a unique time zone future; Australia/LHI
and Australia/Lord_Howe have the same time zone future (not too
surprising, since they're aliases); Etc/GMT+8 and SystemV/PST8 are
identical but no actual locations are 8 hours behind UTC all year so
we can ignore it; parts of Central America and Saskatchewan are 6
hours behind UTC all year; and so forth.
After quickly looking through the above output, I suggest the
following set of 95 entries from the tz database with unique UTC
offset futures. For example, this list uses the name `Europe/Paris'
for CET/CEST (though perhaps `Europe/Brussels' would be more
More information about the tz