1d856f74aSchristosTheory and pragmatics of the tz code and data 2d856f74aSchristos 33a34b570Sjtc 45bd15d64Sjtc----- Outline ----- 55bd15d64Sjtc 6a61b0b2eSchristos Scope of the tz database 7d856f74aSchristos Names of time zone rules 85bd15d64Sjtc Time zone abbreviations 9d856f74aSchristos Accuracy of the tz database 10d856f74aSchristos Time and date functions 11*20e5bd19Schristos Interface stability 12ae7e338dSkleink Calendrical issues 138bd97363Skleink Time and time zones on Mars 145bd15d64Sjtc 155bd15d64Sjtc 16d856f74aSchristos----- Scope of the tz database ----- 17d856f74aSchristos 18d856f74aSchristosThe tz database attempts to record the history and predicted future of 19d856f74aSchristosall computer-based clocks that track civil time. To represent this 20d856f74aSchristosdata, the world is partitioned into regions whose clocks all agree 21d856f74aSchristosabout time stamps that occur after the somewhat-arbitrary cutoff point 22d856f74aSchristosof the POSIX Epoch (1970-01-01 00:00:00 UTC). For each such region, 23d856f74aSchristosthe database records all known clock transitions, and labels the region 24d856f74aSchristoswith a notable location. Although 1970 is a somewhat-arbitrary 25d856f74aSchristoscutoff, there are significant challenges to moving the cutoff earlier 26d856f74aSchristoseven by a decade or two, due to the wide variety of local practices 27d856f74aSchristosbefore computer timekeeping became prevalent. 28d856f74aSchristos 29d856f74aSchristosClock transitions before 1970 are recorded for each such location, 30d856f74aSchristosbecause most systems support time stamps before 1970 and could 31d856f74aSchristosmisbehave if data entries were omitted for pre-1970 transitions. 32d856f74aSchristosHowever, the database is not designed for and does not suffice for 33d856f74aSchristosapplications requiring accurate handling of all past times everywhere, 34d856f74aSchristosas it would take far too much effort and guesswork to record all 35d856f74aSchristosdetails of pre-1970 civil timekeeping. 36d856f74aSchristos 37d856f74aSchristosAs described below, reference source code for using the tz database is 38d856f74aSchristosalso available. The tz code is upwards compatible with POSIX, an 39d856f74aSchristosinternational standard for UNIX-like systems. As of this writing, the 40d856f74aSchristoscurrent edition of POSIX is: 415bd15d64Sjtc 4233d9f9e0Schristos The Open Group Base Specifications Issue 7 43*20e5bd19Schristos IEEE Std 1003.1-2008, 2016 Edition 4433d9f9e0Schristos <http://pubs.opengroup.org/onlinepubs/9699919799/> 455bd15d64Sjtc 46d856f74aSchristos 47d856f74aSchristos 48d856f74aSchristos----- Names of time zone rules ----- 49d856f74aSchristos 50d856f74aSchristosEach of the database's time zone rules has a unique name. 51d856f74aSchristosInexperienced users are not expected to select these names unaided. 52d856f74aSchristosDistributors should provide documentation and/or a simple selection 53d856f74aSchristosinterface that explains the names; for one example, see the 'tzselect' 54d856f74aSchristosprogram in the tz code. The Unicode Common Locale Data Repository 55d856f74aSchristos<http://cldr.unicode.org/> contains data that may be useful for other 56d856f74aSchristosselection interfaces. 57d856f74aSchristos 58d856f74aSchristosThe time zone rule naming conventions attempt to strike a balance 59d856f74aSchristosamong the following goals: 60d856f74aSchristos 61d856f74aSchristos * Uniquely identify every region where clocks have agreed since 1970. 62d856f74aSchristos This is essential for the intended use: static clocks keeping local 63d856f74aSchristos civil time. 64d856f74aSchristos 65d856f74aSchristos * Indicate to experts where that region is. 66d856f74aSchristos 67d856f74aSchristos * Be robust in the presence of political changes. For example, names 68d856f74aSchristos of countries are ordinarily not used, to avoid incompatibilities 69d856f74aSchristos when countries change their name (e.g. Zaire->Congo) or when 70d856f74aSchristos locations change countries (e.g. Hong Kong from UK colony to 71d856f74aSchristos China). 72d856f74aSchristos 73d856f74aSchristos * Be portable to a wide variety of implementations. 74d856f74aSchristos 75d856f74aSchristos * Use a consistent naming conventions over the entire world. 76d856f74aSchristos 77d856f74aSchristosNames normally have the form AREA/LOCATION, where AREA is the name 78d856f74aSchristosof a continent or ocean, and LOCATION is the name of a specific 79d856f74aSchristoslocation within that region. North and South America share the same 80d856f74aSchristosarea, 'America'. Typical names are 'Africa/Cairo', 'America/New_York', 81d856f74aSchristosand 'Pacific/Honolulu'. 82d856f74aSchristos 83d856f74aSchristosHere are the general rules used for choosing location names, 84d856f74aSchristosin decreasing order of importance: 85d856f74aSchristos 86d856f74aSchristos Use only valid POSIX file name components (i.e., the parts of 87d856f74aSchristos names other than '/'). Do not use the file name 88d856f74aSchristos components '.' and '..'. Within a file name component, 89d856f74aSchristos use only ASCII letters, '.', '-' and '_'. Do not use 90d856f74aSchristos digits, as that might create an ambiguity with POSIX 91d856f74aSchristos TZ strings. A file name component must not exceed 14 92d856f74aSchristos characters or start with '-'. E.g., prefer 'Brunei' 93d856f74aSchristos to 'Bandar_Seri_Begawan'. Exceptions: see the discussion 94d856f74aSchristos of legacy names below. 95d856f74aSchristos A name must not be empty, or contain '//', or start or end with '/'. 96d856f74aSchristos Do not use names that differ only in case. Although the reference 97d856f74aSchristos implementation is case-sensitive, some other implementations 98d856f74aSchristos are not, and they would mishandle names differing only in case. 99d856f74aSchristos If one name A is an initial prefix of another name AB (ignoring case), 100d856f74aSchristos then B must not start with '/', as a regular file cannot have 101d856f74aSchristos the same name as a directory in POSIX. For example, 102d856f74aSchristos 'America/New_York' precludes 'America/New_York/Bronx'. 103d856f74aSchristos Uninhabited regions like the North Pole and Bouvet Island 104d856f74aSchristos do not need locations, since local time is not defined there. 105d856f74aSchristos There should typically be at least one name for each ISO 3166-1 106d856f74aSchristos officially assigned two-letter code for an inhabited country 107d856f74aSchristos or territory. 108d856f74aSchristos If all the clocks in a region have agreed since 1970, 109d856f74aSchristos don't bother to include more than one location 110d856f74aSchristos even if subregions' clocks disagreed before 1970. 111d856f74aSchristos Otherwise these tables would become annoyingly large. 112d856f74aSchristos If a name is ambiguous, use a less ambiguous alternative; 113d856f74aSchristos e.g. many cities are named San José and Georgetown, so 114d856f74aSchristos prefer 'Costa_Rica' to 'San_Jose' and 'Guyana' to 'Georgetown'. 115d856f74aSchristos Keep locations compact. Use cities or small islands, not countries 116d856f74aSchristos or regions, so that any future time zone changes do not split 117d856f74aSchristos locations into different time zones. E.g. prefer 'Paris' 118d856f74aSchristos to 'France', since France has had multiple time zones. 119d856f74aSchristos Use mainstream English spelling, e.g. prefer 'Rome' to 'Roma', and 120d856f74aSchristos prefer 'Athens' to the Greek 'Αθήνα' or the Romanized 'Athína'. 121d856f74aSchristos The POSIX file name restrictions encourage this rule. 122d856f74aSchristos Use the most populous among locations in a zone, 123d856f74aSchristos e.g. prefer 'Shanghai' to 'Beijing'. Among locations with 124d856f74aSchristos similar populations, pick the best-known location, 125d856f74aSchristos e.g. prefer 'Rome' to 'Milan'. 126d856f74aSchristos Use the singular form, e.g. prefer 'Canary' to 'Canaries'. 127d856f74aSchristos Omit common suffixes like '_Islands' and '_City', unless that 128d856f74aSchristos would lead to ambiguity. E.g. prefer 'Cayman' to 129d856f74aSchristos 'Cayman_Islands' and 'Guatemala' to 'Guatemala_City', 130d856f74aSchristos but prefer 'Mexico_City' to 'Mexico' because the country 131d856f74aSchristos of Mexico has several time zones. 132d856f74aSchristos Use '_' to represent a space. 133d856f74aSchristos Omit '.' from abbreviations in names, e.g. prefer 'St_Helena' 134d856f74aSchristos to 'St._Helena'. 135d856f74aSchristos Do not change established names if they only marginally 136d856f74aSchristos violate the above rules. For example, don't change 137d856f74aSchristos the existing name 'Rome' to 'Milan' merely because 138d856f74aSchristos Milan's population has grown to be somewhat greater 139d856f74aSchristos than Rome's. 140d856f74aSchristos If a name is changed, put its old spelling in the 'backward' file. 141d856f74aSchristos This means old spellings will continue to work. 142d856f74aSchristos 143d856f74aSchristosThe file 'zone1970.tab' lists geographical locations used to name time 144d856f74aSchristoszone rules. It is intended to be an exhaustive list of names for 145d856f74aSchristosgeographic regions as described above; this is a subset of the names 146d856f74aSchristosin the data. Although a 'zone1970.tab' location's longitude 147d856f74aSchristoscorresponds to its LMT offset with one hour for every 15 degrees east 148d856f74aSchristoslongitude, this relationship is not exact. 149d856f74aSchristos 150d856f74aSchristosOlder versions of this package used a different naming scheme, 151d856f74aSchristosand these older names are still supported. 152d856f74aSchristosSee the file 'backward' for most of these older names 153d856f74aSchristos(e.g., 'US/Eastern' instead of 'America/New_York'). 154d856f74aSchristosThe other old-fashioned names still supported are 155d856f74aSchristos'WET', 'CET', 'MET', and 'EET' (see the file 'europe'). 156d856f74aSchristos 157d856f74aSchristosOlder versions of this package defined legacy names that are 158d856f74aSchristosincompatible with the first rule of location names, but which are 159d856f74aSchristosstill supported. These legacy names are mostly defined in the file 160d856f74aSchristos'etcetera'. Also, the file 'backward' defines the legacy names 161d856f74aSchristos'GMT0', 'GMT-0', 'GMT+0' and 'Canada/East-Saskatchewan', and the file 162d856f74aSchristos'northamerica' defines the legacy names 'EST5EDT', 'CST6CDT', 163d856f74aSchristos'MST7MDT', and 'PST8PDT'. 164d856f74aSchristos 165d856f74aSchristosExcluding 'backward' should not affect the other data. If 166d856f74aSchristos'backward' is excluded, excluding 'etcetera' should not affect the 167d856f74aSchristosremaining data. 168d856f74aSchristos 169d856f74aSchristos 170d856f74aSchristos----- Time zone abbreviations ----- 171d856f74aSchristos 172d856f74aSchristosWhen this package is installed, it generates time zone abbreviations 173d856f74aSchristoslike 'EST' to be compatible with human tradition and POSIX. 174d856f74aSchristosHere are the general rules used for choosing time zone abbreviations, 175d856f74aSchristosin decreasing order of importance: 176d856f74aSchristos 177e4c8546aSchristos Use three or more characters that are ASCII alphanumerics or '+' or '-'. 178d856f74aSchristos Previous editions of this database also used characters like 179d856f74aSchristos ' ' and '?', but these characters have a special meaning to 180d856f74aSchristos the shell and cause commands like 181d856f74aSchristos set `date` 182d856f74aSchristos to have unexpected effects. 183d856f74aSchristos Previous editions of this rule required upper-case letters, 184d856f74aSchristos but the Congressman who introduced Chamorro Standard Time 185e4c8546aSchristos preferred "ChST", so lower-case letters are now allowed. 186e4c8546aSchristos Also, POSIX from 2001 on relaxed the rule to allow '-', '+', 187d856f74aSchristos and alphanumeric characters from the portable character set 188e4c8546aSchristos in the current locale. In practice ASCII alphanumerics and 189e4c8546aSchristos '+' and '-' are safe in all locales. 190e4c8546aSchristos 191e4c8546aSchristos In other words, in the C locale the POSIX extended regular 192e4c8546aSchristos expression [-+[:alnum:]]{3,} should match the abbreviation. 193e4c8546aSchristos This guarantees that all abbreviations could have been 194e4c8546aSchristos specified by a POSIX TZ string. 195d856f74aSchristos 196d856f74aSchristos Use abbreviations that are in common use among English-speakers, 197d856f74aSchristos e.g. 'EST' for Eastern Standard Time in North America. 198d856f74aSchristos We assume that applications translate them to other languages 199d856f74aSchristos as part of the normal localization process; for example, 200d856f74aSchristos a French application might translate 'EST' to 'HNE'. 201d856f74aSchristos 202d856f74aSchristos For zones whose times are taken from a city's longitude, use the 203d856f74aSchristos traditional xMT notation, e.g. 'PMT' for Paris Mean Time. 204d856f74aSchristos The only name like this in current use is 'GMT'. 205d856f74aSchristos 206d856f74aSchristos Use 'LMT' for local mean time of locations before the introduction 207d856f74aSchristos of standard time; see "Scope of the tz database". 208d856f74aSchristos 209d856f74aSchristos If there is no common English abbreviation, use numeric offsets like 210d856f74aSchristos -05 and +0830 that are generated by zic's %z notation. 211d856f74aSchristos 212*20e5bd19Schristos Use current abbreviations for older timestamps to avoid confusion. 213*20e5bd19Schristos For example, in 1910 a common English abbreviation for UT +01 214*20e5bd19Schristos in central Europe was 'MEZ' (short for both "Middle European 215*20e5bd19Schristos Zone" and for "Mitteleuropäische Zeit" in German). Nowadays 216*20e5bd19Schristos 'CET' ("Central European Time") is more common in English, and 217*20e5bd19Schristos the database uses 'CET' even for circa-1910 timestamps as this 218*20e5bd19Schristos is less confusing for modern users and avoids the need for 219*20e5bd19Schristos determining when 'CET' supplanted 'MEZ' in common usage. 220*20e5bd19Schristos 221*20e5bd19Schristos Use a consistent style in a zone's history. For example, if a zone's 222*20e5bd19Schristos history tends to use numeric abbreviations and a particular 223*20e5bd19Schristos entry could go either way, use a numeric abbreviation. 224*20e5bd19Schristos 225d856f74aSchristos [The remaining guidelines predate the introduction of %z. 226d856f74aSchristos They are problematic as they mean tz data entries invent 227d856f74aSchristos notation rather than record it. These guidelines are now 228d856f74aSchristos deprecated and the plan is to gradually move to %z for 229d856f74aSchristos inhabited locations and to "-00" for uninhabited locations.] 230d856f74aSchristos 231d856f74aSchristos If there is no common English abbreviation, abbreviate the English 232d856f74aSchristos translation of the usual phrase used by native speakers. 233d856f74aSchristos If this is not available or is a phrase mentioning the country 234d856f74aSchristos (e.g. "Cape Verde Time"), then: 235d856f74aSchristos 236d856f74aSchristos When a country is identified with a single or principal zone, 237d856f74aSchristos append 'T' to the country's ISO code, e.g. 'CVT' for 238d856f74aSchristos Cape Verde Time. For summer time append 'ST'; 239d856f74aSchristos for double summer time append 'DST'; etc. 240d856f74aSchristos Otherwise, take the first three letters of an English place 241d856f74aSchristos name identifying each zone and append 'T', 'ST', etc. 242*20e5bd19Schristos as before; e.g. 'CHAST' for CHAtham Summer Time. 243d856f74aSchristos 24416bd23daSchristos Use UT (with time zone abbreviation '-00') for locations while 24516bd23daSchristos uninhabited. The leading '-' is a flag that the time 24616bd23daSchristos zone is in some sense undefined; this notation is 24716bd23daSchristos derived from Internet RFC 3339. 248d856f74aSchristos 249d856f74aSchristosApplication writers should note that these abbreviations are ambiguous 250d856f74aSchristosin practice: e.g. 'CST' has a different meaning in China than 251d856f74aSchristosit does in the United States. In new applications, it's often better 252d856f74aSchristosto use numeric UT offsets like '-0600' instead of time zone 253d856f74aSchristosabbreviations like 'CST'; this avoids the ambiguity. 254d856f74aSchristos 255d856f74aSchristos 256d856f74aSchristos----- Accuracy of the tz database ----- 257d856f74aSchristos 258d856f74aSchristosThe tz database is not authoritative, and it surely has errors. 259d856f74aSchristosCorrections are welcome and encouraged; see the file CONTRIBUTING. 260d856f74aSchristosUsers requiring authoritative data should consult national standards 261d856f74aSchristosbodies and the references cited in the database's comments. 262d856f74aSchristos 263d856f74aSchristosErrors in the tz database arise from many sources: 264d856f74aSchristos 265d856f74aSchristos * The tz database predicts future time stamps, and current predictions 266d856f74aSchristos will be incorrect after future governments change the rules. 267d856f74aSchristos For example, if today someone schedules a meeting for 13:00 next 268d856f74aSchristos October 1, Casablanca time, and tomorrow Morocco changes its 269d856f74aSchristos daylight saving rules, software can mess up after the rule change 270d856f74aSchristos if it blithely relies on conversions made before the change. 271d856f74aSchristos 272d856f74aSchristos * The pre-1970 entries in this database cover only a tiny sliver of how 273d856f74aSchristos clocks actually behaved; the vast majority of the necessary 274d856f74aSchristos information was lost or never recorded. Thousands more zones would 275d856f74aSchristos be needed if the tz database's scope were extended to cover even 276d856f74aSchristos just the known or guessed history of standard time; for example, 277d856f74aSchristos the current single entry for France would need to split into dozens 278e4c8546aSchristos of entries, perhaps hundreds. And in most of the world even this 279e4c8546aSchristos approach would be misleading due to widespread disagreement or 280e4c8546aSchristos indifference about what times should be observed. In her 2015 book 281e4c8546aSchristos "The Global Transformation of Time, 1870-1950", Vanessa Ogle writes 282e4c8546aSchristos "Outside of Europe and North America there was no system of time 283e4c8546aSchristos zones at all, often not even a stable landscape of mean times, 284e4c8546aSchristos prior to the middle decades of the twentieth century". See: 285e4c8546aSchristos Timothy Shenk, Booked: A Global History of Time. Dissent 2015-12-17 286e4c8546aSchristos https://www.dissentmagazine.org/blog/booked-a-global-history-of-time-vanessa-ogle 287d856f74aSchristos 288d856f74aSchristos * Most of the pre-1970 data entries come from unreliable sources, often 289d856f74aSchristos astrology books that lack citations and whose compilers evidently 290d856f74aSchristos invented entries when the true facts were unknown, without 291d856f74aSchristos reporting which entries were known and which were invented. 292d856f74aSchristos These books often contradict each other or give implausible entries, 293d856f74aSchristos and on the rare occasions when they are checked they are 294d856f74aSchristos typically found to be incorrect. 295d856f74aSchristos 296d856f74aSchristos * For the UK the tz database relies on years of first-class work done by 297d856f74aSchristos Joseph Myers and others; see <http://www.polyomino.org.uk/british-time/>. 298d856f74aSchristos Other countries are not done nearly as well. 299d856f74aSchristos 300d856f74aSchristos * Sometimes, different people in the same city would maintain clocks 301d856f74aSchristos that differed significantly. Railway time was used by railroad 302d856f74aSchristos companies (which did not always agree with each other), 303d856f74aSchristos church-clock time was used for birth certificates, etc. 304d856f74aSchristos Often this was merely common practice, but sometimes it was set by law. 305d856f74aSchristos For example, from 1891 to 1911 the UT offset in France was legally 306d856f74aSchristos 0:09:21 outside train stations and 0:04:21 inside. 307d856f74aSchristos 308d856f74aSchristos * Although a named location in the tz database stands for the 309d856f74aSchristos containing region, its pre-1970 data entries are often accurate for 310d856f74aSchristos only a small subset of that region. For example, Europe/London 311d856f74aSchristos stands for the United Kingdom, but its pre-1847 times are valid 312d856f74aSchristos only for locations that have London's exact meridian, and its 1847 313d856f74aSchristos transition to GMT is known to be valid only for the L&NW and the 314d856f74aSchristos Caledonian railways. 315d856f74aSchristos 316d856f74aSchristos * The tz database does not record the earliest time for which a zone's 317d856f74aSchristos data entries are thereafter valid for every location in the region. 318d856f74aSchristos For example, Europe/London is valid for all locations in its 319d856f74aSchristos region after GMT was made the standard time, but the date of 320d856f74aSchristos standardization (1880-08-02) is not in the tz database, other than 321d856f74aSchristos in commentary. For many zones the earliest time of validity is 322d856f74aSchristos unknown. 323d856f74aSchristos 324d856f74aSchristos * The tz database does not record a region's boundaries, and in many 325d856f74aSchristos cases the boundaries are not known. For example, the zone 326d856f74aSchristos America/Kentucky/Louisville represents a region around the city of 327d856f74aSchristos Louisville, the boundaries of which are unclear. 328d856f74aSchristos 329d856f74aSchristos * Changes that are modeled as instantaneous transitions in the tz 330d856f74aSchristos database were often spread out over hours, days, or even decades. 331d856f74aSchristos 332d856f74aSchristos * Even if the time is specified by law, locations sometimes 333d856f74aSchristos deliberately flout the law. 334d856f74aSchristos 335d856f74aSchristos * Early timekeeping practices, even assuming perfect clocks, were 336d856f74aSchristos often not specified to the accuracy that the tz database requires. 337d856f74aSchristos 338d856f74aSchristos * Sometimes historical timekeeping was specified more precisely 339d856f74aSchristos than what the tz database can handle. For example, from 1909 to 340d856f74aSchristos 1937 Netherlands clocks were legally UT +00:19:32.13, but the tz 341d856f74aSchristos database cannot represent the fractional second. 342d856f74aSchristos 343d856f74aSchristos * Even when all the timestamp transitions recorded by the tz database 344d856f74aSchristos are correct, the tz rules that generate them may not faithfully 345d856f74aSchristos reflect the historical rules. For example, from 1922 until World 346d856f74aSchristos War II the UK moved clocks forward the day following the third 347d856f74aSchristos Saturday in April unless that was Easter, in which case it moved 348d856f74aSchristos clocks forward the previous Sunday. Because the tz database has no 349d856f74aSchristos way to specify Easter, these exceptional years are entered as 350d856f74aSchristos separate tz Rule lines, even though the legal rules did not change. 351d856f74aSchristos 352d856f74aSchristos * The tz database models pre-standard time using the proleptic Gregorian 353d856f74aSchristos calendar and local mean time (LMT), but many people used other 354d856f74aSchristos calendars and other timescales. For example, the Roman Empire used 355d856f74aSchristos the Julian calendar, and had 12 varying-length daytime hours with a 356d856f74aSchristos non-hour-based system at night. 357d856f74aSchristos 358d856f74aSchristos * Early clocks were less reliable, and data entries do not represent 359*20e5bd19Schristos clock error. 360d856f74aSchristos 361*20e5bd19Schristos * The tz database assumes Universal Time (UT) as an origin, even 362*20e5bd19Schristos though UT is not standardized for older time stamps. In the tz 363*20e5bd19Schristos database commentary, UT denotes a family of time standards that 364*20e5bd19Schristos includes Coordinated Universal Time (UTC) along with other variants 365*20e5bd19Schristos such as UT1 and GMT, with days starting at midnight. Although UT 366*20e5bd19Schristos equals UTC for modern time stamps, UTC was not defined until 1960, 367*20e5bd19Schristos so commentary uses the more-general abbreviation UT for time stamps 368*20e5bd19Schristos that might predate 1960. Since UT, UT1, etc. disagree slightly, 369*20e5bd19Schristos and since pre-1972 UTC seconds varied in length, interpretation of 370*20e5bd19Schristos older time stamps can be problematic when subsecond accuracy is 371*20e5bd19Schristos needed. 372*20e5bd19Schristos 373*20e5bd19Schristos * Civil time was not based on atomic time before 1972, and we don't 374*20e5bd19Schristos know the history of earth's rotation accurately enough to map SI 375*20e5bd19Schristos seconds to historical solar time to more than about one-hour 376*20e5bd19Schristos accuracy. See: Stephenson FR, Morrison LV, Hohenkerk CY. 377*20e5bd19Schristos Measurement of the Earth's rotation: 720 BC to AD 2015. 378*20e5bd19Schristos Proc Royal Soc A. 2016 Dec 7;472:20160404. 379*20e5bd19Schristos http://dx.doi.org/10.1098/rspa.2016.0404 380*20e5bd19Schristos Also see: Espenak F. Uncertainty in Delta T (ΔT). 381*20e5bd19Schristos http://eclipse.gsfc.nasa.gov/SEhelp/uncertainty2004.html 382d856f74aSchristos 383d856f74aSchristos * The relationship between POSIX time (that is, UTC but ignoring leap 384d856f74aSchristos seconds) and UTC is not agreed upon after 1972. Although the POSIX 385d856f74aSchristos clock officially stops during an inserted leap second, at least one 386d856f74aSchristos proposed standard has it jumping back a second instead; and in 387d856f74aSchristos practice POSIX clocks more typically either progress glacially during 388d856f74aSchristos a leap second, or are slightly slowed while near a leap second. 389d856f74aSchristos 390d856f74aSchristos * The tz database does not represent how uncertain its information is. 391d856f74aSchristos Ideally it would contain information about when data entries are 392d856f74aSchristos incomplete or dicey. Partial temporal knowledge is a field of 393d856f74aSchristos active research, though, and it's not clear how to apply it here. 394d856f74aSchristos 395d856f74aSchristosIn short, many, perhaps most, of the tz database's pre-1970 and future 396d856f74aSchristostime stamps are either wrong or misleading. Any attempt to pass the 397d856f74aSchristostz database off as the definition of time should be unacceptable to 398d856f74aSchristosanybody who cares about the facts. In particular, the tz database's 399d856f74aSchristosLMT offsets should not be considered meaningful, and should not prompt 400d856f74aSchristoscreation of zones merely because two locations differ in LMT or 401d856f74aSchristostransitioned to standard time at different dates. 402d856f74aSchristos 403d856f74aSchristos 404d856f74aSchristos----- Time and date functions ----- 405d856f74aSchristos 406d856f74aSchristosThe tz code contains time and date functions that are upwards 407d856f74aSchristoscompatible with those of POSIX. 408d856f74aSchristos 40986162a51SmlelstvPOSIX has the following properties and limitations. 4105bd15d64Sjtc 41186162a51Smlelstv* In POSIX, time display in a process is controlled by the 41286162a51Smlelstv environment variable TZ. Unfortunately, the POSIX TZ string takes 4135bd15d64Sjtc a form that is hard to describe and is error-prone in practice. 41486162a51Smlelstv Also, POSIX TZ strings can't deal with other (for example, Israeli) 4155bd15d64Sjtc daylight saving time rules, or situations where more than two 4163a34b570Sjtc time zone abbreviations are used in an area. 4173a34b570Sjtc 41886162a51Smlelstv The POSIX TZ string takes the following form: 4195bd15d64Sjtc 42033d9f9e0Schristos stdoffset[dst[offset][,date[/time],date[/time]]] 4215bd15d64Sjtc 4225bd15d64Sjtc where: 4235bd15d64Sjtc 4245bd15d64Sjtc std and dst 4255bd15d64Sjtc are 3 or more characters specifying the standard 4265bd15d64Sjtc and daylight saving time (DST) zone names. 42786162a51Smlelstv Starting with POSIX.1-2001, std and dst may also be 42886162a51Smlelstv in a quoted form like "<UTC+10>"; this allows 42986162a51Smlelstv "+" and "-" in the names. 4305bd15d64Sjtc offset 43133d9f9e0Schristos is of the form '[+-]hh:[mm[:ss]]' and specifies the 43233d9f9e0Schristos offset west of UT. 'hh' may be a single digit; 0<=hh<=24. 43333d9f9e0Schristos The default DST offset is one hour ahead of standard time. 4345bd15d64Sjtc date[/time],date[/time] 4355bd15d64Sjtc specifies the beginning and end of DST. If this is absent, 4365bd15d64Sjtc the system supplies its own rules for DST, and these can 4375bd15d64Sjtc differ from year to year; typically US DST rules are used. 4385bd15d64Sjtc time 43933d9f9e0Schristos takes the form 'hh:[mm[:ss]]' and defaults to 02:00. 44033d9f9e0Schristos This is the same format as the offset, except that a 44133d9f9e0Schristos leading '+' or '-' is not allowed. 4425bd15d64Sjtc date 4435bd15d64Sjtc takes one of the following forms: 4445bd15d64Sjtc Jn (1<=n<=365) 4455bd15d64Sjtc origin-1 day number not counting February 29 4465bd15d64Sjtc n (0<=n<=365) 4475bd15d64Sjtc origin-0 day number counting February 29 if present 4485bd15d64Sjtc Mm.n.d (0[Sunday]<=d<=6[Saturday], 1<=n<=5, 1<=m<=12) 4495bd15d64Sjtc for the dth day of week n of month m of the year, 4505bd15d64Sjtc where week 1 is the first week in which day d appears, 45133d9f9e0Schristos and '5' stands for the last week in which day d appears 4525bd15d64Sjtc (which may be either the 4th or 5th week). 45333d9f9e0Schristos Typically, this is the only useful form; 45433d9f9e0Schristos the n and Jn forms are rarely used. 4555bd15d64Sjtc 45686162a51Smlelstv Here is an example POSIX TZ string, for US Pacific time using rules 45786162a51Smlelstv appropriate from 1987 through 2006: 45886162a51Smlelstv 45986162a51Smlelstv TZ='PST8PDT,M4.1.0/02:00,M10.5.0/02:00' 46086162a51Smlelstv 46186162a51Smlelstv This POSIX TZ string is hard to remember, and mishandles time stamps 46286162a51Smlelstv before 1987 and after 2006. With this package you can use this 46386162a51Smlelstv instead: 46486162a51Smlelstv 46586162a51Smlelstv TZ='America/Los_Angeles' 46686162a51Smlelstv 46786162a51Smlelstv* POSIX does not define the exact meaning of TZ values like "EST5EDT". 46886162a51Smlelstv Typically the current US DST rules are used to interpret such values, 4695bd15d64Sjtc but this means that the US DST rules are compiled into each program 4705bd15d64Sjtc that does time conversion. This means that when US time conversion 4713a34b570Sjtc rules change (as in the United States in 1987), all programs that 4723a34b570Sjtc do time conversion must be recompiled to ensure proper results. 4733a34b570Sjtc 474af580f3aSchristos* The TZ environment variable is process-global, which makes it hard 475af580f3aSchristos to write efficient, thread-safe applications that need access 476af580f3aSchristos to multiple time zones. 477af580f3aSchristos 47886162a51Smlelstv* In POSIX, there's no tamper-proof way for a process to learn the 4793a34b570Sjtc system's best idea of local wall clock. (This is important for 4803ad51082Schristos applications that an administrator wants used only at certain times - 4813a34b570Sjtc without regard to whether the user has fiddled the "TZ" environment 4821c631d03Sjtc variable. While an administrator can "do everything in UTC" to get 4833a34b570Sjtc around the problem, doing so is inconvenient and precludes handling 4843ad51082Schristos daylight saving time shifts - as might be required to limit phone 4853a34b570Sjtc calls to off-peak hours.) 4863a34b570Sjtc 487af580f3aSchristos* POSIX provides no convenient and efficient way to determine the UT 488af580f3aSchristos offset and time zone abbreviation of arbitrary time stamps, 489af580f3aSchristos particularly for time zone settings that do not fit into the 490af580f3aSchristos POSIX model. 491af580f3aSchristos 49286162a51Smlelstv* POSIX requires that systems ignore leap seconds. 4933a34b570Sjtc 4943ad51082Schristos* The tz code attempts to support all the time_t implementations 49533d9f9e0Schristos allowed by POSIX. The time_t type represents a nonnegative count of 49633d9f9e0Schristos seconds since 1970-01-01 00:00:00 UTC, ignoring leap seconds. 49733d9f9e0Schristos In practice, time_t is usually a signed 64- or 32-bit integer; 32-bit 49833d9f9e0Schristos signed time_t values stop working after 2038-01-19 03:14:07 UTC, so 49933d9f9e0Schristos new implementations these days typically use a signed 64-bit integer. 50033d9f9e0Schristos Unsigned 32-bit integers are used on one or two platforms, 5011f6103b1Schristos and 36-bit and 40-bit integers are also used occasionally. 50233d9f9e0Schristos Although earlier POSIX versions allowed time_t to be a 50333d9f9e0Schristos floating-point type, this was not supported by any practical 50433d9f9e0Schristos systems, and POSIX.1-2013 and the tz code both require time_t 50533d9f9e0Schristos to be an integer type. 50633d9f9e0Schristos 50786162a51SmlelstvThese are the extensions that have been made to the POSIX functions: 5083a34b570Sjtc 5093a34b570Sjtc* The "TZ" environment variable is used in generating the name of a file 5103a34b570Sjtc from which time zone information is read (or is interpreted a la 5113a34b570Sjtc POSIX); "TZ" is no longer constrained to be a three-letter time zone 5123a34b570Sjtc name followed by a number of hours and an optional three-letter 5133a34b570Sjtc daylight time zone name. The daylight saving time rules to be used 5143a34b570Sjtc for a particular time zone are encoded in the time zone file; 5153a34b570Sjtc the format of the file allows U.S., Australian, and other rules to be 5163a34b570Sjtc encoded, and allows for situations where more than two time zone 5173a34b570Sjtc abbreviations are used. 5183a34b570Sjtc 5193a34b570Sjtc It was recognized that allowing the "TZ" environment variable to 520c743e76aSjtc take on values such as "America/New_York" might cause "old" programs 5213a34b570Sjtc (that expect "TZ" to have a certain form) to operate incorrectly; 5223a34b570Sjtc consideration was given to using some other environment variable 5233a34b570Sjtc (for example, "TIMEZONE") to hold the string used to generate the 5243a34b570Sjtc time zone information file name. In the end, however, it was decided 5253a34b570Sjtc to continue using "TZ": it is widely used for time zone purposes; 5263a34b570Sjtc separately maintaining both "TZ" and "TIMEZONE" seemed a nuisance; 5273a34b570Sjtc and systems where "new" forms of "TZ" might cause problems can simply 5283a34b570Sjtc use TZ values such as "EST5EDT" which can be used both by 5293a34b570Sjtc "new" programs (a la POSIX) and "old" programs (as zone names and 5303a34b570Sjtc offsets). 5313a34b570Sjtc 532af580f3aSchristos* The code supports platforms with a UT offset member in struct tm, 533af580f3aSchristos e.g., tm_gmtoff. 534af580f3aSchristos 535af580f3aSchristos* The code supports platforms with a time zone abbreviation member in 536af580f3aSchristos struct tm, e.g., tm_zone. 5373a34b570Sjtc 5383a34b570Sjtc* Since the "TZ" environment variable can now be used to control time 5393a34b570Sjtc conversion, the "daylight" and "timezone" variables are no longer 5405bd15d64Sjtc needed. (These variables are defined and set by "tzset"; however, their 5413a34b570Sjtc values will not be used by "localtime.") 5423a34b570Sjtc 543af580f3aSchristos* Functions tzalloc, tzfree, localtime_rz, and mktime_z for 544af580f3aSchristos more-efficient thread-safe applications that need to use 545af580f3aSchristos multiple time zones. The tzalloc and tzfree functions 546af580f3aSchristos allocate and free objects of type timezone_t, and localtime_rz 547af580f3aSchristos and mktime_z are like localtime_r and mktime with an extra 548af580f3aSchristos timezone_t argument. The functions were inspired by NetBSD. 5493a34b570Sjtc 5503a34b570Sjtc* A function "tzsetwall" has been added to arrange for the system's 5513a34b570Sjtc best approximation to local wall clock time to be delivered by 5523a34b570Sjtc subsequent calls to "localtime." Source code for portable 5533a34b570Sjtc applications that "must" run on local wall clock time should call 554c743e76aSjtc "tzsetwall();" if such code is moved to "old" systems that don't 555c743e76aSjtc provide tzsetwall, you won't be able to generate an executable program. 5563a34b570Sjtc (These time zone functions also arrange for local wall clock time to be 5573ad51082Schristos used if tzset is called - directly or indirectly - and there's no "TZ" 5583a34b570Sjtc environment variable; portable applications should not, however, rely 5593a34b570Sjtc on this behavior since it's not the way SVR2 systems behave.) 5603a34b570Sjtc 56133d9f9e0Schristos* Negative time_t values are supported, on systems where time_t is signed. 56233d9f9e0Schristos 56386162a51Smlelstv* These functions can account for leap seconds, thanks to Bradley White. 5643a34b570Sjtc 5655bd15d64SjtcPoints of interest to folks with other systems: 5665bd15d64Sjtc 567af580f3aSchristos* Code compatible with this package is already part of many platforms, 568af580f3aSchristos including GNU/Linux, Android, the BSDs, Chromium OS, Cygwin, AIX, iOS, 569af580f3aSchristos BlackBery 10, macOS, Microsoft Windows, OpenVMS, and Solaris. 5705bd15d64Sjtc On such hosts, the primary use of this package 5715bd15d64Sjtc is to update obsolete time zone rule tables. 5725bd15d64Sjtc To do this, you may need to compile the time zone compiler 57333d9f9e0Schristos 'zic' supplied with this package instead of using the system 'zic', 574af580f3aSchristos since the format of zic's input is occasionally extended, 575af580f3aSchristos and a platform may still be shipping an older zic. 5765bd15d64Sjtc 57784a2a5caSkleink* The UNIX Version 7 "timezone" function is not present in this package; 5783a34b570Sjtc it's impossible to reliably map timezone's arguments (a "minutes west 5793a34b570Sjtc of GMT" value and a "daylight saving time in effect" flag) to a 5803a34b570Sjtc time zone abbreviation, and we refuse to guess. 5813a34b570Sjtc Programs that in the past used the timezone function may now examine 5823a34b570Sjtc tzname[localtime(&clock)->tm_isdst] to learn the correct time 583c743e76aSjtc zone abbreviation to use. Alternatively, use 584c743e76aSjtc localtime(&clock)->tm_zone if this has been enabled. 5853a34b570Sjtc 5865bd15d64Sjtc* The 4.2BSD gettimeofday function is not used in this package. 5875bd15d64Sjtc This formerly let users obtain the current UTC offset and DST flag, 5885bd15d64Sjtc but this functionality was removed in later versions of BSD. 5895bd15d64Sjtc 5905bd15d64Sjtc* In SVR2, time conversion fails for near-minimum or near-maximum 59133d9f9e0Schristos time_t values when doing conversions for places that don't use UT. 5925bd15d64Sjtc This package takes care to do these conversions correctly. 593af580f3aSchristos A comment in the source code tells how to get compatibly wrong 594af580f3aSchristos results. 5953a34b570Sjtc 596c743e76aSjtcThe functions that are conditionally compiled if STD_INSPIRED is defined 597c743e76aSjtcshould, at this point, be looked on primarily as food for thought. They are 5983ad51082Schristosnot in any sense "standard compatible" - some are not, in fact, specified in 599c743e76aSjtc*any* standard. They do, however, represent responses of various authors to 6003a34b570Sjtcstandardization proposals. 6013a34b570Sjtc 6023a34b570SjtcOther time conversion proposals, in particular the one developed by folks at 6033a34b570SjtcHewlett Packard, offer a wider selection of functions that provide capabilities 6043a34b570Sjtcbeyond those provided here. The absence of such functions from this package 6053a34b570Sjtcis not meant to discourage the development, standardization, or use of such 6063a34b570Sjtcfunctions. Rather, their absence reflects the decision to make this package 60786162a51Smlelstvcontain valid extensions to POSIX, to ensure its broad acceptability. If 60886162a51Smlelstvmore powerful time conversion functions can be standardized, so much the 60986162a51Smlelstvbetter. 6105bd15d64Sjtc 6115bd15d64Sjtc 612af580f3aSchristos----- Interface stability ----- 613af580f3aSchristos 614af580f3aSchristosThe tz code and data supply the following interfaces: 615af580f3aSchristos 616af580f3aSchristos * A set of zone names as per "Names of time zone rules" above. 617af580f3aSchristos 618af580f3aSchristos * Library functions described in "Time and date functions" above. 619af580f3aSchristos 620af580f3aSchristos * The programs tzselect, zdump, and zic, documented in their man pages. 621af580f3aSchristos 622af580f3aSchristos * The format of zic input files, documented in the zic man page. 623af580f3aSchristos 624af580f3aSchristos * The format of zic output files, documented in the tzfile man page. 625af580f3aSchristos 626af580f3aSchristos * The format of zone table files, documented in zone1970.tab. 627af580f3aSchristos 628af580f3aSchristos * The format of the country code file, documented in iso3166.tab. 629af580f3aSchristos 630*20e5bd19Schristos * The version number of the code and data, as the first line of 631*20e5bd19Schristos the text file 'version' in each release. 632*20e5bd19Schristos 633*20e5bd19SchristosInterface changes in a release attempt to preserve compatibility with 634*20e5bd19Schristosrecent releases. For example, tz data files typically do not rely on 635*20e5bd19Schristosrecently-added zic features, so that users can run older zic versions 636*20e5bd19Schristosto process newer data files. The tz-link.htm file describes how 637*20e5bd19Schristosreleases are tagged and distributed. 638af580f3aSchristos 639af580f3aSchristosInterfaces not listed above are less stable. For example, users 640af580f3aSchristosshould not rely on particular UT offsets or abbreviations for time 641af580f3aSchristosstamps, as data entries are often based on guesswork and these guesses 642af580f3aSchristosmay be corrected or improved. 643af580f3aSchristos 644af580f3aSchristos 645ae7e338dSkleink----- Calendrical issues ----- 646ae7e338dSkleink 647ae7e338dSkleinkCalendrical issues are a bit out of scope for a time zone database, 648ae7e338dSkleinkbut they indicate the sort of problems that we would run into if we 649ae7e338dSkleinkextended the time zone database further into the past. An excellent 650a61b0b2eSchristosresource in this area is Nachum Dershowitz and Edward M. Reingold, 6513ad51082SchristosCalendrical Calculations: Third Edition, Cambridge University Press (2008) 6523ad51082Schristos<http://emr.cs.iit.edu/home/reingold/calendar-book/third-edition/>. 6533ad51082SchristosOther information and sources are given below. They sometimes disagree. 654ae7e338dSkleink 655ae7e338dSkleink 656ae7e338dSkleinkFrance 657ae7e338dSkleink 658ae7e338dSkleinkGregorian calendar adopted 1582-12-20. 659ae7e338dSkleinkFrench Revolutionary calendar used 1793-11-24 through 1805-12-31, 660ae7e338dSkleinkand (in Paris only) 1871-05-06 through 1871-05-23. 661ae7e338dSkleink 662ae7e338dSkleink 663ae7e338dSkleinkRussia 664ae7e338dSkleink 66586162a51SmlelstvFrom Chris Carrier (1996-12-02): 66633d9f9e0SchristosOn 1929-10-01 the Soviet Union instituted an "Eternal Calendar" 667ae7e338dSkleinkwith 30-day months plus 5 holidays, with a 5-day week. 668ae7e338dSkleinkOn 1931-12-01 it changed to a 6-day week; in 1934 it reverted to the 669ae7e338dSkleinkGregorian calendar while retaining the 6-day week; on 1940-06-27 it 670ae7e338dSkleinkreverted to the 7-day week. With the 6-day week the usual days 671ae7e338dSkleinkoff were the 6th, 12th, 18th, 24th and 30th of the month. 672ae7e338dSkleink(Source: Evitiar Zerubavel, _The Seven Day Circle_) 673ae7e338dSkleink 674ae7e338dSkleink 675ae7e338dSkleinkMark Brader reported a similar story in "The Book of Calendars", edited 676ae7e338dSkleinkby Frank Parise (1982, Facts on File, ISBN 0-8719-6467-8), page 377. But: 677ae7e338dSkleink 678ae7e338dSkleinkFrom: Petteri Sulonen (via Usenet) 679ae7e338dSkleinkDate: 14 Jan 1999 00:00:00 GMT 68086162a51Smlelstv... 681ae7e338dSkleink 6823ad51082SchristosIf your source is correct, how come documents between 1929 and 1940 were 683ae7e338dSkleinkstill dated using the conventional, Gregorian calendar? 684ae7e338dSkleink 685ae7e338dSkleinkI can post a scan of a document dated December 1, 1934, signed by 686ae7e338dSkleinkYenukidze, the secretary, on behalf of Kalinin, the President of the 687ae7e338dSkleinkExecutive Committee of the Supreme Soviet, if you like. 688ae7e338dSkleink 689ae7e338dSkleink 690ae7e338dSkleink 691ae7e338dSkleinkSweden (and Finland) 692ae7e338dSkleink 69386162a51SmlelstvFrom: Mark Brader 6943ad51082SchristosSubject: Re: Gregorian reform - a part of locale? 6953ad51082Schristos<news:1996Jul6.012937.29190@sq.com> 696ae7e338dSkleinkDate: 1996-07-06 697ae7e338dSkleink 698ae7e338dSkleinkIn 1700, Denmark made the transition from Julian to Gregorian. Sweden 699ae7e338dSkleinkdecided to *start* a transition in 1700 as well, but rather than have one of 700ae7e338dSkleinkthose unsightly calendar gaps :-), they simply decreed that the next leap 7013ad51082Schristosyear after 1696 would be in 1744 - putting the whole country on a calendar 702ae7e338dSkleinkdifferent from both Julian and Gregorian for a period of 40 years. 703ae7e338dSkleink 704ae7e338dSkleinkHowever, in 1704 something went wrong and the plan was not carried through; 705ae7e338dSkleinkthey did, after all, have a leap year that year. And one in 1708. In 1712 706ae7e338dSkleinkthey gave it up and went back to Julian, putting 30 days in February that 707ae7e338dSkleinkyear!... 708ae7e338dSkleink 709ae7e338dSkleinkThen in 1753, Sweden made the transition to Gregorian in the usual manner, 710ae7e338dSkleinkgetting there only 13 years behind the original schedule. 711ae7e338dSkleink 712ae7e338dSkleink(A previous posting of this story was challenged, and Swedish readers 7133ad51082Schristosproduced the following references to support it: "Tideräkning och historia" 7143ad51082Schristosby Natanael Beckman (1924) and "Tid, en bok om tideräkning och 7153ad51082Schristoskalenderväsen" by Lars-Olof Lodén (1968). 716ae7e338dSkleink 717ae7e338dSkleink 718ae7e338dSkleinkGrotefend's data 719ae7e338dSkleink 72086162a51SmlelstvFrom: "Michael Palmer" [with one obvious typo fixed] 721ae7e338dSkleinkSubject: Re: Gregorian Calendar (was Re: Another FHC related question 722ae7e338dSkleinkNewsgroups: soc.genealogy.german 723ae7e338dSkleinkDate: Tue, 9 Feb 1999 02:32:48 -800 72486162a51Smlelstv... 725ae7e338dSkleink 726ae7e338dSkleinkThe following is a(n incomplete) listing, arranged chronologically, of 727ae7e338dSkleinkEuropean states, with the date they converted from the Julian to the 728ae7e338dSkleinkGregorian calendar: 729ae7e338dSkleink 730ae7e338dSkleink04/15 Oct 1582 - Italy (with exceptions), Spain, Portugal, Poland (Roman 731ae7e338dSkleink Catholics and Danzig only) 732ae7e338dSkleink09/20 Dec 1582 - France, Lorraine 733ae7e338dSkleink 734ae7e338dSkleink21 Dec 1582/ 735ae7e338dSkleink 01 Jan 1583 - Holland, Brabant, Flanders, Hennegau 7363ad51082Schristos10/21 Feb 1583 - bishopric of Liege (Lüttich) 737ae7e338dSkleink13/24 Feb 1583 - bishopric of Augsburg 738ae7e338dSkleink04/15 Oct 1583 - electorate of Trier 739ae7e338dSkleink05/16 Oct 1583 - Bavaria, bishoprics of Freising, Eichstedt, Regensburg, 740ae7e338dSkleink Salzburg, Brixen 7413ad51082Schristos13/24 Oct 1583 - Austrian Oberelsaß and Breisgau 742ae7e338dSkleink20/31 Oct 1583 - bishopric of Basel 7433ad51082Schristos02/13 Nov 1583 - duchy of Jülich-Berg 7443ad51082Schristos02/13 Nov 1583 - electorate and city of Köln 7453ad51082Schristos04/15 Nov 1583 - bishopric of Würzburg 746ae7e338dSkleink11/22 Nov 1583 - electorate of Mainz 747ae7e338dSkleink16/27 Nov 1583 - bishopric of Strassburg and the margraviate of Baden 7483ad51082Schristos17/28 Nov 1583 - bishopric of Münster and duchy of Cleve 749ae7e338dSkleink14/25 Dec 1583 - Steiermark 750ae7e338dSkleink 751ae7e338dSkleink06/17 Jan 1584 - Austria and Bohemia 7523ad51082Schristos11/22 Jan 1584 - Lucerne, Uri, Schwyz, Zug, Freiburg, Solothurn 753ae7e338dSkleink12/23 Jan 1584 - Silesia and the Lausitz 754ae7e338dSkleink22 Jan/ 755ae7e338dSkleink 02 Feb 1584 - Hungary (legally on 21 Oct 1587) 756ae7e338dSkleink Jun 1584 - Unterwalden 757ae7e338dSkleink01/12 Jul 1584 - duchy of Westfalen 758ae7e338dSkleink 759ae7e338dSkleink16/27 Jun 1585 - bishopric of Paderborn 760ae7e338dSkleink 761ae7e338dSkleink14/25 Dec 1590 - Transylvania 762ae7e338dSkleink 763ae7e338dSkleink22 Aug/ 764ae7e338dSkleink 02 Sep 1612 - duchy of Prussia 765ae7e338dSkleink 766ae7e338dSkleink13/24 Dec 1614 - Pfalz-Neuburg 767ae7e338dSkleink 768ae7e338dSkleink 1617 - duchy of Kurland (reverted to the Julian calendar in 769ae7e338dSkleink 1796) 770ae7e338dSkleink 7713ad51082Schristos 1624 - bishopric of Osnabrück 772ae7e338dSkleink 773ae7e338dSkleink 1630 - bishopric of Minden 774ae7e338dSkleink 775ae7e338dSkleink15/26 Mar 1631 - bishopric of Hildesheim 776ae7e338dSkleink 777ae7e338dSkleink 1655 - Kanton Wallis 778ae7e338dSkleink 779ae7e338dSkleink05/16 Feb 1682 - city of Strassburg 780ae7e338dSkleink 781ae7e338dSkleink18 Feb/ 782ae7e338dSkleink 01 Mar 1700 - Protestant Germany (including Swedish possessions in 783ae7e338dSkleink Germany), Denmark, Norway 784ae7e338dSkleink30 Jun/ 785ae7e338dSkleink 12 Jul 1700 - Gelderland, Zutphen 786ae7e338dSkleink10 Nov/ 787ae7e338dSkleink 12 Dec 1700 - Utrecht, Overijssel 788ae7e338dSkleink 789ae7e338dSkleink31 Dec 1700/ 7903ad51082Schristos 12 Jan 1701 - Friesland, Groningen, Zürich, Bern, Basel, Geneva, 791ae7e338dSkleink Turgau, and Schaffhausen 792ae7e338dSkleink 793ae7e338dSkleink 1724 - Glarus, Appenzell, and the city of St. Gallen 794ae7e338dSkleink 795ae7e338dSkleink01 Jan 1750 - Pisa and Florence 796ae7e338dSkleink 797ae7e338dSkleink02/14 Sep 1752 - Great Britain 798ae7e338dSkleink 799ae7e338dSkleink17 Feb/ 800ae7e338dSkleink 01 Mar 1753 - Sweden 801ae7e338dSkleink 8023ad51082Schristos1760-1812 - Graubünden 803ae7e338dSkleink 804ae7e338dSkleinkThe Russian empire (including Finland and the Baltic states) did not 805ae7e338dSkleinkconvert to the Gregorian calendar until the Soviet revolution of 1917. 806ae7e338dSkleink 807ae7e338dSkleinkSource: H. Grotefend, _Taschenbuch der Zeitrechnung des deutschen 808ae7e338dSkleinkMittelalters und der Neuzeit_, herausgegeben von Dr. O. Grotefend 809ae7e338dSkleink(Hannover: Hahnsche Buchhandlung, 1941), pp. 26-28. 8108bd97363Skleink 8118bd97363Skleink 8128bd97363Skleink----- Time and time zones on Mars ----- 8138bd97363Skleink 814aa771cb9SchristosSome people's work schedules use Mars time. Jet Propulsion Laboratory 815aa771cb9Schristos(JPL) coordinators have kept Mars time on and off at least since 1997 816aa771cb9Schristosfor the Mars Pathfinder mission. Some of their family members have 817aa771cb9Schristosalso adapted to Mars time. Dozens of special Mars watches were built 818aa771cb9Schristosfor JPL workers who kept Mars time during the Mars Exploration 8198bd97363SkleinkRovers mission (2004). These timepieces look like normal Seikos and 8208bd97363SkleinkCitizens but use Mars seconds rather than terrestrial seconds. 8218bd97363Skleink 8228bd97363SkleinkA Mars solar day is called a "sol" and has a mean period equal to 8238bd97363Skleinkabout 24 hours 39 minutes 35.244 seconds in terrestrial time. It is 8248bd97363Skleinkdivided into a conventional 24-hour clock, so each Mars second equals 8258bd97363Skleinkabout 1.02749125 terrestrial seconds. 8268bd97363Skleink 8278bd97363SkleinkThe prime meridian of Mars goes through the center of the crater 8288bd97363SkleinkAiry-0, named in honor of the British astronomer who built the 8298bd97363SkleinkGreenwich telescope that defines Earth's prime meridian. Mean solar 8308bd97363Skleinktime on the Mars prime meridian is called Mars Coordinated Time (MTC). 8318bd97363Skleink 8328bd97363SkleinkEach landed mission on Mars has adopted a different reference for 8338bd97363Skleinksolar time keeping, so there is no real standard for Mars time zones. 8348bd97363SkleinkFor example, the Mars Exploration Rover project (2004) defined two 8358bd97363Skleinktime zones "Local Solar Time A" and "Local Solar Time B" for its two 8368bd97363Skleinkmissions, each zone designed so that its time equals local true solar 8378bd97363Skleinktime at approximately the middle of the nominal mission. Such a "time 8388bd97363Skleinkzone" is not particularly suited for any application other than the 8398bd97363Skleinkmission itself. 8408bd97363Skleink 8418bd97363SkleinkMany calendars have been proposed for Mars, but none have achieved 8428bd97363Skleinkwide acceptance. Astronomers often use Mars Sol Date (MSD) which is a 8438bd97363Skleinksequential count of Mars solar days elapsed since about 1873-12-29 8448bd97363Skleink12:00 GMT. 8458bd97363Skleink 8468bd97363SkleinkThe tz database does not currently support Mars time, but it is 8478bd97363Skleinkdocumented here in the hopes that support will be added eventually. 8488bd97363Skleink 8498bd97363SkleinkSources: 8508bd97363Skleink 8518bd97363SkleinkMichael Allison and Robert Schmunk, 8528bd97363Skleink"Technical Notes on Mars Solar Time as Adopted by the Mars24 Sunclock" 853a37624b5Schristos<http://www.giss.nasa.gov/tools/mars24/help/notes.html> (2012-08-08). 8548bd97363Skleink 8558bd97363SkleinkJia-Rui Chong, "Workdays Fit for a Martian", Los Angeles Times 856a37624b5Schristos<http://articles.latimes.com/2004/jan/14/science/sci-marstime14> 8578bd97363Skleink(2004-01-14), pp A1, A20-A21. 8583ad51082Schristos 859aa771cb9SchristosTom Chmielewski, "Jet Lag Is Worse on Mars", The Atlantic (2015-02-26) 860aa771cb9Schristos<http://www.theatlantic.com/technology/archive/2015/02/jet-lag-is-worse-on-mars/386033/> 8613ad51082Schristos 8623ad51082Schristos----- 863d856f74aSchristos 864d856f74aSchristosThis file is in the public domain, so clarified as of 2009-05-17 by 865d856f74aSchristosArthur David Olson. 866d856f74aSchristos 867d856f74aSchristos----- 8683ad51082SchristosLocal Variables: 8693ad51082Schristoscoding: utf-8 8703ad51082SchristosEnd: 871