From World Afropedia
Jump to: navigation, search

The tz database, also called the zoneinfo database or IANA Time Zone Database, is a collaborative compilation of information about the world's time zones, primarily intended for use with computer programs and operating systems.[1] It is sometimes referred to as the Olson database after the founding contributor Arthur David Olson.[2] Paul Eggert is editor and maintainer of the tz database.[3]

Its most recognizable feature is the uniform naming convention designed by Paul Eggert for time zones, such as "America/New_York" and "Europe/Paris" (see List of tz database time zones).[4] The database attempts to record historical time zones and all civil changes since 1970, the Unix time epoch.[5] It also includes transitions such as daylight saving time, and even records leap seconds.[6]

The tz database partitions the world into regions where local clocks have all been the same since 1970. This map, taken from the 2009r edition of the database, is of all the regions outside Antarctica.[7]

History

The project's origins go back to at least 1986.[8] The project's database, as well as some reference source code, is in the public domain.[9] New editions of the database are published as changes warrant, usually several times per year.[10]

2011 lawsuit

On September 30, 2011, a lawsuit, Astrolabe, Inc. v. Olson et al.,[11][12] was filed concerning copyright in the database. As a result, on October 6, 2011, the database's maintenance (mailing list) and dissemination (FTP site) operations were shut down.[13] The case revolves around the use by the database maintainers of the atlases The American Atlas by Thomas G. Shanks and The International Atlas by Thomas G. Shanks and Rique Pottenger. It specifically complains of unauthorised reproduction of the atlases' data in the timezone mailing list archive and in some auxiliary link collections maintained with the database, but doesn't actually point at the database itself. The complaint relates only to the compilation of historical timezone data, and does not cover current tzdata world timezone tables.[12][14][15] The tz database clearly references its sources, including the atlas, in comments, allowing the extent of use of the data to be evaluated.[16][17]

This lawsuit was resolved on February 22, 2012 when Astrolabe voluntarily dismissed the lawsuit without having ever served the defendants and agreed to a covenant not to sue in the future.[18]

Move to ICANN

ICANN took responsibility for the maintenance of the database on October 14, 2011.[19] The full database and a description of current and future plans for its maintenance are available online from IANA.[20]

Data structure

File formats

The tz database is published as a set of text files which list the rules and zone transitions in a human-readable format. For use, these text files are compiled into a set of platform-independent binary files—one per time zone. The reference source code includes such a compiler called zic (zone information compiler), as well as code to read those files and use them in standard APIs such as localtime() and mktime().

Definition of a time zone

Within the tz database, a time zone is any national region where local clocks have all agreed since 1970.[21] This definition concerns itself first with geographic areas which have had consistent local clocks. This is different from other definitions which concern themselves with consistent offsets from a prime meridian. Therefore each of the time zones defined by the tz database may document multiple offsets to UTC, typically containing both the standard time and the daylight saving time in the same zone.

Each time zone has one or more "zone lines" in one of the time zone text files. The first zone line for a time zone gives the name of the time zone; any subsequent zone lines for that time zone leave the name blank, indicating that they apply to the same zone as the previous line. Each zone line specifies, for a range of date and time, the offset to UTC for standard time in that zone, the name of the set of rules that govern daylight saving time in that zone (or a hyphen if standard time always applies in the time zone), the format for time zone abbreviations in the time zone, and, for all but the last zone line, the date and time at which the range of date and time governed by that line ends.

Daylight Saving Time (DST) rules

The rules for daylight saving time are specified in named rule sets. Each rule set has one or more rule lines in the time zone text files. A rule line contains the name of the rule set to which it belongs, the first year in which the rule applies, the last year in which the rule applies (or "only" if it applies only in one year or "max" if it is the rule currently in effect), the type of year to which the rule applies ("-" if it applies to all years in the specified range, which is almost always the case, otherwise a name used as an argument to a script that indicates whether the year is of the specified type), the month in which the rule takes effect, the day on which the rule takes effect (which could either be a specific day or a specification such as "the last Sunday of the month"), the time of day at which the rule takes effect, the amount of time to add to the offset to UTC when the rule is in effect, and the letter or letters to use in the time zone abbreviation (for example, "S" if the rule governs standard time and "D" if it governs daylight saving time).

Names of time zones

The time zones have unique names in the form "Area/Location", e.g. "America/New_York", in an attempt to make them easier to understand by humans. A choice was also made to use English names or equivalents, and to omit punctuation and common suffixes. The underscore character is used in place of spaces. Hyphens are used where they appear in the name of a location.

Area

Area is either the name of a continent and ocean or "Etc". The set of continents and oceans currently include: Africa, America, Antarctica, Arctic, Asia, Atlantic, Australia, Europe, Indian, and Pacific.

The special area of Etc is used for some administrative zones, particularly for "Etc/UTC" which represents Coordinated Universal Time. In order to conform with the POSIX style, those zone names beginning with "Etc/GMT" have their sign reversed from what most people expect. In this style, zones west of GMT have a positive sign and those east have a negative sign in their name (e.g "Etc/GMT-14" is 14 hours ahead/east of GMT.)

Location

Location is the name of a specific location within that region, usually cities or small islands.

Country names are not used in this scheme, primarily because they would not be robust due to frequent political and boundary changes. The names of large cities tend to be more permanent. However, the database maintainers attempt to include at least one zone for every ISO 3166-1 alpha-2 country code, and a number of user interfaces to the database take advantage of this. Additionally there is a desire to keep locations geographically compact so that any future time zone changes do not split locations into different time zones.[citation needed]

Usually the most populous city in a region is chosen to represent the entire time zone, although other cities may be selected if they are more widely known or result in a less ambiguous name.[citation needed] In the event that the name of a city changes, the convention is to create an alias[citation needed] in future editions so that both the old and new names refer to the same database entry.

In some cases the Location is itself represented as a compound name, for example the time zone "America/Indiana/Indianapolis". The only three-level names currently include those under "America/Argentina/...", "America/Kentucky/...", "America/Indiana/...", and "America/North_Dakota/...".

The location selected is representative for the entire area.

On 2010-05-01 Arthur David Olson mentions a 14 character limit,[22] to justify dropping "de" as in the name of Bahia de Banderas and using only "Bahia_Banderas" for the identifier America/Bahia_Banderas.

Examples

America/Costa_Rica name of country used because the name of the largest city San José is ambiguous
America/New_York Space replaced with underscore
Asia/Sakhalin name of island used, because largest city, Yuzhno-Sakhalinsk, has more than 14 characters
America/Bahia_Banderas name of largest city altered, "de" removed from Bahia de Banderas, because correct name has more than 14 characters
Antarctica/DumontDUrville the apostrophe is removed. Removal of space not conforming to the rule that requires replacement with "_", but with "_" the name would have 15 chars

Example zone and rule lines

These are rule lines for the standard United States daylight saving time rules, rule lines for the daylight saving time rules in effect in the US Eastern Time Zone (called "NYC" as New York City is the city representing that zone) in some years, and zone lines for the America/New_York time zone, as of the tzdata2011n release of the time zone database. The zone and rule lines reflect the history of DST in the United States. <syntaxhighlight lang="text">

  1. Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S

Rule US 1918 1919 - Mar lastSun 2:00 1:00 D Rule US 1918 1919 - Oct lastSun 2:00 0 S Rule US 1942 only - Feb 9 2:00 1:00 W # War Rule US 1945 only - Aug 14 23:00u 1:00 P # Peace Rule US 1945 only - Sep 30 2:00 0 S Rule US 1967 2006 - Oct lastSun 2:00 0 S Rule US 1967 1973 - Apr lastSun 2:00 1:00 D Rule US 1974 only - Jan 6 2:00 1:00 D Rule US 1975 only - Feb 23 2:00 1:00 D Rule US 1976 1986 - Apr lastSun 2:00 1:00 D Rule US 1987 2006 - Apr Sun>=1 2:00 1:00 D Rule US 2007 max - Mar Sun>=8 2:00 1:00 D Rule US 2007 max - Nov Sun>=1 2:00 0 S ....

  1. Rule NAME FROM TO TYPE IN ON AT SAVE LETTER

Rule NYC 1920 only - Mar lastSun 2:00 1:00 D Rule NYC 1920 only - Oct lastSun 2:00 0 S Rule NYC 1921 1966 - Apr lastSun 2:00 1:00 D Rule NYC 1921 1954 - Sep lastSun 2:00 0 S Rule NYC 1955 1966 - Oct lastSun 2:00 0 S

  1. Zone NAME GMTOFF RULES FORMAT [UNTIL]

Zone America/New_York -4:56:02 - LMT 1883 Nov 18 12:03:58

                       -5:00   US      E%sT    1920
                       -5:00   NYC     E%sT    1942
                       -5:00   US      E%sT    1946
                       -5:00   NYC     E%sT    1967
                       -5:00   US      E%sT

</syntaxhighlight>

Data stored for each zone

For each time zone that has multiple offsets, usually the standard and daylight variants, the tz database records the exact moment of transition. The format can accommodate changes in the dates and times of transitions as well.

Zone.tab

The file zone.tab is in the public domain and lists the zones. Columns and row sorting are described in the comments of the file, as follows:

# This file contains a table with the following columns:
# 1.  ISO 3166 2-character country code.  See the file `iso3166.tab'.
# 2.  Latitude and longitude of the zone's principal location
#     in ISO 6709 sign-degrees-minutes-seconds format,
#     either +-DDMM+-DDDMM or +-DDMMSS+-DDDMMSS,
#     first latitude (+ is north), then longitude (+ is east).
# 3.  Zone name used in value of TZ environment variable.
# 4.  Comments; present if and only if the country has multiple rows.
#
# Columns are separated by a single tab.
# The table is sorted first by country, then an order within the country that
# (1) makes some geographical sense, and
# (2) puts the most populous zones first, where that does not contradict (1).

Data before 1970

Data before 1970 aims to be correct for the city identifying the region, but is not necessarily correct for the entire region. This is because new regions are created only as required to distinguish clocks since 1970.

For example, between 1963-10-23 and 1963-12-09 in Brazil only the states of Minas Gerais, Espirito Santo, Rio de Janeiro and São Paulo had summer time, but on request a split from America/Sao_Paulo was rejected with the reasoning that since 1970 the clocks were the same in the whole region.[23]

Time in Germany, which is represented by Europe/Berlin, is not correct for the year 1945 when the Trizone used different daylight saving time rules than Berlin.[citation needed]

Coverage

Zones covering multiple post-1970 countries

There are two zones that cover an area that was covered by two countries after 1970. The tzdata follows the definitions of countries as per ISO 3166-1, whose predecessor ISO 3166 was first published in 1974.

Maintenance

The tz reference code and database is maintained by a group of volunteers. Arthur David Olson makes most of the changes to the code, and Paul Eggert to the database. Proposed changes are sent to the tz mailing list, which is gatewayed to the comp.time.tz Usenet newsgroup. Source files are distributed via the FTP server elsie.nci.nih.gov. Typically, these files are taken by a software distributor like Debian, compiled, and then the source and binaries are packaged as part of that distribution. End users can either rely on their software distribution's update procedures, which may entail some delay, or obtain the source directly from ftp://elsie.nci.nih.gov/pub/ and build the binary files themselves. A future maintenance plan based on similar principles has been drafted through the IETF. Since 14 October 2011 IANA acts as a repository for the TZ database and associated reference code.[24]

Pursuant to a lawsuit,[12] the FTP server and mailing list have been shut down.[13]

Unix-like systems

The standard path for the timezone database is /usr/share/zoneinfo/ on most Unix-like systems, including Linux distributions. The file command has support for displaying the binary timezone files in a human-friendly textual form built-in:

$ file /usr/share/zoneinfo/Europe/Berlin
/usr/share/zoneinfo/Europe/Berlin: timezone data, version 2, 8 gmt time flags, 8 std time flags, no leap seconds, 144 transition times, 8 abbreviation chars

Usage and extensions

Boundaries of time zones

Geographical boundaries in form of coordinate sets are not part of the tz database, but boundaries are published by Eric Muller[7] in the form of vector polygons. Using these vector polygons, one can determine, for each place on the globe, the tzdata zone in which it is located.

Use in other standards

CLDR uses UN/LOCODEs to identify regions.[25] This means all identifiers are referencing a country, something that the creators of the tz database wanted to avoid.

Use in software systems

The tz database is used for time zone processing and conversions in many computer software systems, including:

The Olson timezone IDs are also used by the Unicode Common Locale Data Repository (CLDR) and International Components for Unicode (ICU). For example, the CLDR Windows → Tzid table maps Microsoft Windows time zone IDs to the standard Olson names.[32]

See also

References

  1. Lua error in ...ribunto/includes/engines/LuaCommon/lualib/mwInit.lua at line 17: bad argument #1 to 'old_pairs' (table expected, got nil).
  2. Lua error in ...ribunto/includes/engines/LuaCommon/lualib/mwInit.lua at line 17: bad argument #1 to 'old_pairs' (table expected, got nil).
  3. Lua error in ...ribunto/includes/engines/LuaCommon/lualib/mwInit.lua at line 17: bad argument #1 to 'old_pairs' (table expected, got nil).
  4. Lua error in ...ribunto/includes/engines/LuaCommon/lualib/mwInit.lua at line 17: bad argument #1 to 'old_pairs' (table expected, got nil).
  5. Lua error in ...ribunto/includes/engines/LuaCommon/lualib/mwInit.lua at line 17: bad argument #1 to 'old_pairs' (table expected, got nil).
  6. Lua error in ...ribunto/includes/engines/LuaCommon/lualib/mwInit.lua at line 17: bad argument #1 to 'old_pairs' (table expected, got nil).
  7. 7.0 7.1 Muller, Eric. A shapefile of the TZ timezones of the world [updated 2009-11-23].
  8. Lua error in ...ribunto/includes/engines/LuaCommon/lualib/mwInit.lua at line 17: bad argument #1 to 'old_pairs' (table expected, got nil).
  9. Lua error in ...ribunto/includes/engines/LuaCommon/lualib/mwInit.lua at line 17: bad argument #1 to 'old_pairs' (table expected, got nil).
  10. "zoneinfo tzcode and tzdata archives (FTP)". Retrieved 2007-10-30.
  11. "Astrolabe, Inc. v. Olson et al". 2011-10-06. Retrieved 2011-10-06.
  12. 12.0 12.1 12.2 "ASTROLABE, INC., Plaintiff, v. ARTHUR DAVID OLSON and PAUL EGGERT, Defendants" (PDF). 2011-09-30. Retrieved 2011-10-07.
  13. 13.0 13.1 Olson, Arthur David (2011-10-06). "Civil suit; ftp shutdown; mailing list shutdown". Retrieved 2011-10-06.
  14. "Time zone database shut down". The Daily Parker. 2011-10-06. Retrieved 2011-10-06.
  15. "Time-zone database - Astrolabe's opinion". Stephen Colebourne's blog. 13 October 2011. Retrieved 26 October 2011.
  16. "Time-zone database down". Stephen Colebourne's blog. 6 October 2011. Retrieved 26 October 2011.
  17. "Civil Suit Filed, Involving the Time Zone Database". Slashdot. Geeknet, Inc. 2011-10-06.
  18. "EFF Wins Protection for Time Zone Database". Electronic Frontier Foundation website. 22 February 2012. Retrieved 22 February 2012.
  19. "ICANN News Alert - ICANN to Manage Time Zone Database". 2011-10-15. Retrieved 2011-12-30.
  20. "IANA -- Time Zone Database".
  21. Theory (text file), contained in the "tzcode" distribution. Version tzcode2007h.tar.gz 2007-10-01 referenced.
  22. Olson, Arthur David (2010-05-01). "proposed time zone package changes (Bahia de Banderas; version naming)". gmane.comp.time.tz.
  23. Lua error in ...ribunto/includes/engines/LuaCommon/lualib/mwInit.lua at line 17: bad argument #1 to 'old_pairs' (table expected, got nil).
  24. "Time zone database has new home after lawsuit". 2011-10-17. Retrieved 2011-10-17.
  25. "Unicode Locale Extension ('u') for BCP 47". CLDR - Unicode Common Locale Data Repository.
  26. "Olson time zone support and setup". AIX 7.1 information. IBM. Retrieved 2011-03-12.
  27. "Managing the Time Zone Variable". IBM. 2007-02-02. Retrieved 2011-03-11.
  28. 28.0 28.1 "AIX O/S updated to support 2007 Daylight Saving Time change". IBM. 2007-10-18. Retrieved 2011-03-12.
  29. "2007 daylight savings [sic] time changes for Unix". Academic Computing and Communications Center, University of Illinois at Chicago. 2007-02-25. Retrieved 2008-03-18.)
  30. Wickremasinghe, Christopher (2009-03-30). "Introduction of daylight saving time in Western Australia 2006". AIX Wiki. IBM. Retrieved 2011-03-11.
  31. Lua error in ...ribunto/includes/engines/LuaCommon/lualib/mwInit.lua at line 17: bad argument #1 to 'old_pairs' (table expected, got nil).
  32. "Windows → Tzid". Unicode Consortium. 2007-11-12. Retrieved 2008-02-17.

External links

Official IANA sources
Other sources for tzdata and tzcode
Man pages
  • zic(8) – Linux Administration and Privileged Commands Manual (gives the syntax of source files for the tz database)
  • tzfile(5) – Linux File Formats Manual (gives the format of compiled tz database files)

Lua error in package.lua at line 80: module 'strict' not found.

de:Zeitzonen-Datenbank es:TZ Database eo:Tempozona datumaro fr:Tz database ja:Tz database ru:Tz database fi:Aikavyöhyketietokanta sv:Tz database uk:Tz database zh:时区信息数据库