Theory revision 1.17
11.9SmlelstvThis file is in the public domain, so clarified as of
21.9Smlelstv2009-05-17 by Arthur David Olson.
31.2Sperry
41.2Sperry----- Outline -----
51.2Sperry
61.2Sperry	Time and date functions
71.10Schristos	Scope of the tz database
81.10Schristos	Names of time zone rule files
91.2Sperry	Time zone abbreviations
101.4Skleink	Calendrical issues
111.8Skleink	Time and time zones on Mars
121.2Sperry
131.2Sperry----- Time and date functions -----
141.2Sperry
151.14SchristosThese time and date functions are upwards compatible with those of POSIX,
161.7Skleinkan international standard for UNIX-like systems.
171.9SmlelstvAs of this writing, the current edition of POSIX is:
181.2Sperry
191.14Schristos  The Open Group Base Specifications Issue 7
201.14Schristos  IEEE Std 1003.1, 2013 Edition
211.14Schristos  <http://pubs.opengroup.org/onlinepubs/9699919799/>
221.2Sperry
231.9SmlelstvPOSIX has the following properties and limitations.
241.2Sperry
251.9Smlelstv*	In POSIX, time display in a process is controlled by the
261.9Smlelstv	environment variable TZ.  Unfortunately, the POSIX TZ string takes
271.2Sperry	a form that is hard to describe and is error-prone in practice.
281.9Smlelstv	Also, POSIX TZ strings can't deal with other (for example, Israeli)
291.2Sperry	daylight saving time rules, or situations where more than two
301.1Sjtc	time zone abbreviations are used in an area.
311.1Sjtc
321.9Smlelstv	The POSIX TZ string takes the following form:
331.2Sperry
341.14Schristos		stdoffset[dst[offset][,date[/time],date[/time]]]
351.2Sperry
361.2Sperry	where:
371.6Skleink
381.2Sperry	std and dst
391.2Sperry		are 3 or more characters specifying the standard
401.2Sperry		and daylight saving time (DST) zone names.
411.9Smlelstv		Starting with POSIX.1-2001, std and dst may also be
421.9Smlelstv		in a quoted form like "<UTC+10>"; this allows
431.9Smlelstv		"+" and "-" in the names.
441.2Sperry	offset
451.14Schristos		is of the form '[+-]hh:[mm[:ss]]' and specifies the
461.14Schristos		offset west of UT.  'hh' may be a single digit; 0<=hh<=24.
471.14Schristos		The default DST offset is one hour ahead of standard time.
481.2Sperry	date[/time],date[/time]
491.2Sperry		specifies the beginning and end of DST.  If this is absent,
501.2Sperry		the system supplies its own rules for DST, and these can
511.2Sperry		differ from year to year; typically US DST rules are used.
521.2Sperry	time
531.14Schristos		takes the form 'hh:[mm[:ss]]' and defaults to 02:00.
541.14Schristos		This is the same format as the offset, except that a
551.14Schristos		leading '+' or '-' is not allowed.
561.2Sperry	date
571.2Sperry		takes one of the following forms:
581.2Sperry		Jn (1<=n<=365)
591.2Sperry			origin-1 day number not counting February 29
601.2Sperry		n (0<=n<=365)
611.2Sperry			origin-0 day number counting February 29 if present
621.2Sperry		Mm.n.d (0[Sunday]<=d<=6[Saturday], 1<=n<=5, 1<=m<=12)
631.2Sperry			for the dth day of week n of month m of the year,
641.2Sperry			where week 1 is the first week in which day d appears,
651.14Schristos			and '5' stands for the last week in which day d appears
661.2Sperry			(which may be either the 4th or 5th week).
671.14Schristos			Typically, this is the only useful form;
681.14Schristos			the n and Jn forms are rarely used.
691.2Sperry
701.9Smlelstv	Here is an example POSIX TZ string, for US Pacific time using rules
711.9Smlelstv	appropriate from 1987 through 2006:
721.9Smlelstv
731.9Smlelstv		TZ='PST8PDT,M4.1.0/02:00,M10.5.0/02:00'
741.9Smlelstv
751.9Smlelstv	This POSIX TZ string is hard to remember, and mishandles time stamps
761.9Smlelstv	before 1987 and after 2006.  With this package you can use this
771.9Smlelstv	instead:
781.9Smlelstv
791.9Smlelstv		TZ='America/Los_Angeles'
801.9Smlelstv
811.9Smlelstv*	POSIX does not define the exact meaning of TZ values like "EST5EDT".
821.9Smlelstv	Typically the current US DST rules are used to interpret such values,
831.2Sperry	but this means that the US DST rules are compiled into each program
841.2Sperry	that does time conversion.  This means that when US time conversion
851.1Sjtc	rules change (as in the United States in 1987), all programs that
861.1Sjtc	do time conversion must be recompiled to ensure proper results.
871.1Sjtc
881.9Smlelstv*	In POSIX, there's no tamper-proof way for a process to learn the
891.1Sjtc	system's best idea of local wall clock.  (This is important for
901.15Schristos	applications that an administrator wants used only at certain times -
911.1Sjtc	without regard to whether the user has fiddled the "TZ" environment
921.3Sjtc	variable.  While an administrator can "do everything in UTC" to get
931.1Sjtc	around the problem, doing so is inconvenient and precludes handling
941.15Schristos	daylight saving time shifts - as might be required to limit phone
951.1Sjtc	calls to off-peak hours.)
961.1Sjtc
971.9Smlelstv*	POSIX requires that systems ignore leap seconds.
981.1Sjtc
991.15Schristos*	The tz code attempts to support all the time_t implementations
1001.14Schristos	allowed by POSIX.  The time_t type represents a nonnegative count of
1011.14Schristos	seconds since 1970-01-01 00:00:00 UTC, ignoring leap seconds.
1021.14Schristos	In practice, time_t is usually a signed 64- or 32-bit integer; 32-bit
1031.14Schristos	signed time_t values stop working after 2038-01-19 03:14:07 UTC, so
1041.14Schristos	new implementations these days typically use a signed 64-bit integer.
1051.14Schristos	Unsigned 32-bit integers are used on one or two platforms,
1061.16Schristos	and 36-bit and 40-bit integers are also used occasionally.
1071.14Schristos	Although earlier POSIX versions allowed time_t to be a
1081.14Schristos	floating-point type, this was not supported by any practical
1091.14Schristos	systems, and POSIX.1-2013 and the tz code both require time_t
1101.14Schristos	to be an integer type.
1111.14Schristos
1121.9SmlelstvThese are the extensions that have been made to the POSIX functions:
1131.1Sjtc
1141.1Sjtc*	The "TZ" environment variable is used in generating the name of a file
1151.1Sjtc	from which time zone information is read (or is interpreted a la
1161.1Sjtc	POSIX); "TZ" is no longer constrained to be a three-letter time zone
1171.1Sjtc	name followed by a number of hours and an optional three-letter
1181.1Sjtc	daylight time zone name.  The daylight saving time rules to be used
1191.1Sjtc	for a particular time zone are encoded in the time zone file;
1201.1Sjtc	the format of the file allows U.S., Australian, and other rules to be
1211.1Sjtc	encoded, and allows for situations where more than two time zone
1221.1Sjtc	abbreviations are used.
1231.1Sjtc
1241.1Sjtc	It was recognized that allowing the "TZ" environment variable to
1251.2Sperry	take on values such as "America/New_York" might cause "old" programs
1261.1Sjtc	(that expect "TZ" to have a certain form) to operate incorrectly;
1271.1Sjtc	consideration was given to using some other environment variable
1281.1Sjtc	(for example, "TIMEZONE") to hold the string used to generate the
1291.1Sjtc	time zone information file name.  In the end, however, it was decided
1301.16Schristos	to continue using "TZ": it is widely used for time zone purposes;
1311.1Sjtc	separately maintaining both "TZ" and "TIMEZONE" seemed a nuisance;
1321.1Sjtc	and systems where "new" forms of "TZ" might cause problems can simply
1331.1Sjtc	use TZ values such as "EST5EDT" which can be used both by
1341.1Sjtc	"new" programs (a la POSIX) and "old" programs (as zone names and
1351.1Sjtc	offsets).
1361.1Sjtc
1371.1Sjtc*	To handle places where more than two time zone abbreviations are used,
1381.1Sjtc	the functions "localtime" and "gmtime" set tzname[tmp->tm_isdst]
1391.1Sjtc	(where "tmp" is the value the function returns) to the time zone
1401.9Smlelstv	abbreviation to be used.  This differs from POSIX, where the elements
1411.1Sjtc	of tzname are only changed as a result of calls to tzset.
1421.1Sjtc
1431.1Sjtc*	Since the "TZ" environment variable can now be used to control time
1441.1Sjtc	conversion, the "daylight" and "timezone" variables are no longer
1451.2Sperry	needed.  (These variables are defined and set by "tzset"; however, their
1461.1Sjtc	values will not be used by "localtime.")
1471.1Sjtc
1481.1Sjtc*	The "localtime" function has been set up to deliver correct results
1491.1Sjtc	for near-minimum or near-maximum time_t values.  (A comment in the
1501.1Sjtc	source code tells how to get compatibly wrong results).
1511.1Sjtc
1521.1Sjtc*	A function "tzsetwall" has been added to arrange for the system's
1531.1Sjtc	best approximation to local wall clock time to be delivered by
1541.1Sjtc	subsequent calls to "localtime."  Source code for portable
1551.1Sjtc	applications that "must" run on local wall clock time should call
1561.2Sperry	"tzsetwall();" if such code is moved to "old" systems that don't
1571.2Sperry	provide tzsetwall, you won't be able to generate an executable program.
1581.1Sjtc	(These time zone functions also arrange for local wall clock time to be
1591.15Schristos	used if tzset is called - directly or indirectly - and there's no "TZ"
1601.1Sjtc	environment variable; portable applications should not, however, rely
1611.1Sjtc	on this behavior since it's not the way SVR2 systems behave.)
1621.1Sjtc
1631.14Schristos*	Negative time_t values are supported, on systems where time_t is signed.
1641.14Schristos
1651.9Smlelstv*	These functions can account for leap seconds, thanks to Bradley White.
1661.1Sjtc
1671.2SperryPoints of interest to folks with other systems:
1681.2Sperry
1691.2Sperry*	This package is already part of many POSIX-compliant hosts,
1701.2Sperry	including BSD, HP, Linux, Network Appliance, SCO, SGI, and Sun.
1711.2Sperry	On such hosts, the primary use of this package
1721.2Sperry	is to update obsolete time zone rule tables.
1731.2Sperry	To do this, you may need to compile the time zone compiler
1741.14Schristos	'zic' supplied with this package instead of using the system 'zic',
1751.2Sperry	since the format of zic's input changed slightly in late 1994,
1761.2Sperry	and many vendors still do not support the new input format.
1771.2Sperry
1781.7Skleink*	The UNIX Version 7 "timezone" function is not present in this package;
1791.1Sjtc	it's impossible to reliably map timezone's arguments (a "minutes west
1801.1Sjtc	of GMT" value and a "daylight saving time in effect" flag) to a
1811.1Sjtc	time zone abbreviation, and we refuse to guess.
1821.1Sjtc	Programs that in the past used the timezone function may now examine
1831.1Sjtc	tzname[localtime(&clock)->tm_isdst] to learn the correct time
1841.2Sperry	zone abbreviation to use.  Alternatively, use
1851.2Sperry	localtime(&clock)->tm_zone if this has been enabled.
1861.2Sperry
1871.2Sperry*	The 4.2BSD gettimeofday function is not used in this package.
1881.2Sperry	This formerly let users obtain the current UTC offset and DST flag,
1891.2Sperry	but this functionality was removed in later versions of BSD.
1901.1Sjtc
1911.2Sperry*	In SVR2, time conversion fails for near-minimum or near-maximum
1921.14Schristos	time_t values when doing conversions for places that don't use UT.
1931.2Sperry	This package takes care to do these conversions correctly.
1941.2Sperry
1951.2SperryThe functions that are conditionally compiled if STD_INSPIRED is defined
1961.2Sperryshould, at this point, be looked on primarily as food for thought.  They are
1971.15Schristosnot in any sense "standard compatible" - some are not, in fact, specified in
1981.2Sperry*any* standard.  They do, however, represent responses of various authors to
1991.1Sjtcstandardization proposals.
2001.1Sjtc
2011.1SjtcOther time conversion proposals, in particular the one developed by folks at
2021.1SjtcHewlett Packard, offer a wider selection of functions that provide capabilities
2031.1Sjtcbeyond those provided here.  The absence of such functions from this package
2041.1Sjtcis not meant to discourage the development, standardization, or use of such
2051.1Sjtcfunctions.  Rather, their absence reflects the decision to make this package
2061.9Smlelstvcontain valid extensions to POSIX, to ensure its broad acceptability.  If
2071.9Smlelstvmore powerful time conversion functions can be standardized, so much the
2081.9Smlelstvbetter.
2091.2Sperry
2101.2Sperry
2111.10Schristos----- Scope of the tz database -----
2121.10Schristos
2131.11SchristosThe tz database attempts to record the history and predicted future of
2141.11Schristosall computer-based clocks that track civil time.  To represent this
2151.11Schristosdata, the world is partitioned into regions whose clocks all agree
2161.11Schristosabout time stamps that occur after the somewhat-arbitrary cutoff point
2171.11Schristosof the POSIX Epoch (1970-01-01 00:00:00 UTC).  For each such region,
2181.11Schristosthe database records all known clock transitions, and labels the region
2191.14Schristoswith a notable location.  Although 1970 is a somewhat-arbitrary
2201.14Schristoscutoff, there are significant challenges to moving the cutoff earlier
2211.14Schristoseven by a decade or two, due to the wide variety of local practices
2221.14Schristosbefore computer timekeeping became prevalent.
2231.10Schristos
2241.11SchristosClock transitions before 1970 are recorded for each such location,
2251.11Schristosbecause most POSIX-compatible systems support negative time stamps and
2261.16Schristoscould misbehave if data entries were omitted for pre-1970 transitions.
2271.11SchristosHowever, the database is not designed for and does not suffice for
2281.11Schristosapplications requiring accurate handling of all past times everywhere,
2291.11Schristosas it would take far too much effort and guesswork to record all
2301.10Schristosdetails of pre-1970 civil timekeeping.
2311.10Schristos
2321.14Schristos
2331.14Schristos----- Accuracy of the tz database -----
2341.14Schristos
2351.14SchristosThe tz database is not authoritative, and it surely has errors.
2361.16SchristosCorrections are welcome and encouraged; see the file CONTRIBUTING.
2371.16SchristosUsers requiring authoritative data should consult national standards
2381.16Schristosbodies and the references cited in the database's comments.
2391.10Schristos
2401.14SchristosErrors in the tz database arise from many sources:
2411.14Schristos
2421.14Schristos * The tz database predicts future time stamps, and current predictions
2431.14Schristos   will be incorrect after future governments change the rules.
2441.14Schristos   For example, if today someone schedules a meeting for 13:00 next
2451.14Schristos   October 1, Casablanca time, and tomorrow Morocco changes its
2461.14Schristos   daylight saving rules, software can mess up after the rule change
2471.14Schristos   if it blithely relies on conversions made before the change.
2481.14Schristos
2491.16Schristos * The pre-1970 entries in this database cover only a tiny sliver of how
2501.14Schristos   clocks actually behaved; the vast majority of the necessary
2511.14Schristos   information was lost or never recorded.  Thousands more zones would
2521.14Schristos   be needed if the tz database's scope were extended to cover even
2531.14Schristos   just the known or guessed history of standard time; for example,
2541.14Schristos   the current single entry for France would need to split into dozens
2551.14Schristos   of entries, perhaps hundreds.
2561.14Schristos
2571.16Schristos * Most of the pre-1970 data entries come from unreliable sources, often
2581.14Schristos   astrology books that lack citations and whose compilers evidently
2591.14Schristos   invented entries when the true facts were unknown, without
2601.14Schristos   reporting which entries were known and which were invented.
2611.14Schristos   These books often contradict each other or give implausible entries,
2621.16Schristos   and on the rare occasions when they are checked they are
2631.14Schristos   typically found to be incorrect.
2641.14Schristos
2651.14Schristos * For the UK the tz database relies on years of first-class work done by
2661.14Schristos   Joseph Myers and others; see <http://www.polyomino.org.uk/british-time/>.
2671.14Schristos   Other countries are not done nearly as well.
2681.14Schristos
2691.14Schristos * Sometimes, different people in the same city would maintain clocks
2701.14Schristos   that differed significantly.  Railway time was used by railroad
2711.14Schristos   companies (which did not always agree with each other),
2721.14Schristos   church-clock time was used for birth certificates, etc.
2731.14Schristos   Often this was merely common practice, but sometimes it was set by law.
2741.14Schristos   For example, from 1891 to 1911 the UT offset in France was legally
2751.14Schristos   0:09:21 outside train stations and 0:04:21 inside.
2761.14Schristos
2771.14Schristos * Although a named location in the tz database stands for the
2781.14Schristos   containing region, its pre-1970 data entries are often accurate for
2791.14Schristos   only a small subset of that region.  For example, Europe/London
2801.14Schristos   stands for the United Kingdom, but its pre-1847 times are valid
2811.14Schristos   only for locations that have London's exact meridian, and its 1847
2821.14Schristos   transition to GMT is known to be valid only for the L&NW and the
2831.14Schristos   Caledonian railways.
2841.14Schristos
2851.16Schristos * The tz database does not record the earliest time for which a zone's
2861.16Schristos   data entries are thereafter valid for every location in the region.
2871.14Schristos   For example, Europe/London is valid for all locations in its
2881.14Schristos   region after GMT was made the standard time, but the date of
2891.14Schristos   standardization (1880-08-02) is not in the tz database, other than
2901.14Schristos   in commentary.  For many zones the earliest time of validity is
2911.14Schristos   unknown.
2921.14Schristos
2931.14Schristos * The tz database does not record a region's boundaries, and in many
2941.14Schristos   cases the boundaries are not known.  For example, the zone
2951.14Schristos   America/Kentucky/Louisville represents a region around the city of
2961.14Schristos   Louisville, the boundaries of which are unclear.
2971.14Schristos
2981.14Schristos * Changes that are modeled as instantaneous transitions in the tz
2991.14Schristos   database were often spread out over hours, days, or even decades.
3001.14Schristos
3011.14Schristos * Even if the time is specified by law, locations sometimes
3021.14Schristos   deliberately flout the law.
3031.14Schristos
3041.14Schristos * Early timekeeping practices, even assuming perfect clocks, were
3051.14Schristos   often not specified to the accuracy that the tz database requires.
3061.14Schristos
3071.14Schristos * Sometimes historical timekeeping was specified more precisely
3081.14Schristos   than what the tz database can handle.  For example, from 1909 to
3091.14Schristos   1937 Netherlands clocks were legally UT+00:19:32.13, but the tz
3101.14Schristos   database cannot represent the fractional second.
3111.14Schristos
3121.14Schristos * Even when all the timestamp transitions recorded by the tz database
3131.14Schristos   are correct, the tz rules that generate them may not faithfully
3141.14Schristos   reflect the historical rules.  For example, from 1922 until World
3151.14Schristos   War II the UK moved clocks forward the day following the third
3161.14Schristos   Saturday in April unless that was Easter, in which case it moved
3171.14Schristos   clocks forward the previous Sunday.  Because the tz database has no
3181.14Schristos   way to specify Easter, these exceptional years are entered as
3191.14Schristos   separate tz Rule lines, even though the legal rules did not change.
3201.14Schristos
3211.16Schristos * The tz database models pre-standard time using the proleptic Gregorian
3221.14Schristos   calendar and local mean time (LMT), but many people used other
3231.14Schristos   calendars and other timescales.  For example, the Roman Empire used
3241.14Schristos   the Julian calendar, and had 12 varying-length daytime hours with a
3251.14Schristos   non-hour-based system at night.
3261.14Schristos
3271.16Schristos * Early clocks were less reliable, and data entries do not represent
3281.16Schristos   this unreliability.
3291.14Schristos
3301.14Schristos * As for leap seconds, civil time was not based on atomic time before
3311.14Schristos   1972, and we don't know the history of earth's rotation accurately
3321.14Schristos   enough to map SI seconds to historical solar time to more than
3331.14Schristos   about one-hour accuracy.  See: Morrison LV, Stephenson FR.
3341.14Schristos   Historical values of the Earth's clock error Delta T and the
3351.14Schristos   calculation of eclipses. J Hist Astron. 2004;35:327-36
3361.14Schristos   <http://adsabs.harvard.edu/full/2004JHA....35..327M>;
3371.14Schristos   Historical values of the Earth's clock error. J Hist Astron. 2005;36:339
3381.14Schristos   <http://adsabs.harvard.edu/full/2005JHA....36..339M>.
3391.14Schristos
3401.14Schristos * The relationship between POSIX time (that is, UTC but ignoring leap
3411.14Schristos   seconds) and UTC is not agreed upon after 1972.  Although the POSIX
3421.14Schristos   clock officially stops during an inserted leap second, at least one
3431.14Schristos   proposed standard has it jumping back a second instead; and in
3441.14Schristos   practice POSIX clocks more typically either progress glacially during
3451.14Schristos   a leap second, or are slightly slowed while near a leap second.
3461.14Schristos
3471.14Schristos * The tz database does not represent how uncertain its information is.
3481.16Schristos   Ideally it would contain information about when data entries are
3491.14Schristos   incomplete or dicey.  Partial temporal knowledge is a field of
3501.14Schristos   active research, though, and it's not clear how to apply it here.
3511.14Schristos
3521.14SchristosIn short, many, perhaps most, of the tz database's pre-1970 and future
3531.14Schristostime stamps are either wrong or misleading.  Any attempt to pass the
3541.14Schristostz database off as the definition of time should be unacceptable to
3551.14Schristosanybody who cares about the facts.  In particular, the tz database's
3561.14SchristosLMT offsets should not be considered meaningful, and should not prompt
3571.14Schristoscreation of zones merely because two locations differ in LMT or
3581.14Schristostransitioned to standard time at different dates.
3591.14Schristos
3601.10Schristos
3611.2Sperry----- Names of time zone rule files -----
3621.2Sperry
3631.6SkleinkThe time zone rule file naming conventions attempt to strike a balance
3641.6Skleinkamong the following goals:
3651.6Skleink
3661.6Skleink * Uniquely identify every national region where clocks have all
3671.6Skleink   agreed since 1970.  This is essential for the intended use: static
3681.6Skleink   clocks keeping local civil time.
3691.6Skleink
3701.12Schristos * Indicate to humans as to where that region is.  This simplifies use.
3711.6Skleink
3721.6Skleink * Be robust in the presence of political changes.  This reduces the
3731.6Skleink   number of updates and backward-compatibility hacks.  For example,
3741.6Skleink   names of countries are ordinarily not used, to avoid
3751.6Skleink   incompatibilities when countries change their name
3761.6Skleink   (e.g. Zaire->Congo) or when locations change countries
3771.6Skleink   (e.g. Hong Kong from UK colony to China).
3781.6Skleink
3791.6Skleink * Be portable to a wide variety of implementations.
3801.6Skleink   This promotes use of the technology.
3811.6Skleink
3821.6Skleink * Use a consistent naming convention over the entire world.
3831.6Skleink   This simplifies both use and maintenance.
3841.6Skleink
3851.6SkleinkThis naming convention is not intended for use by inexperienced users
3861.6Skleinkto select TZ values by themselves (though they can of course examine
3871.6Skleinkand reuse existing settings).  Distributors should provide
3881.6Skleinkdocumentation and/or a simple selection interface that explains the
3891.6Skleinknames; see the 'tzselect' program supplied with this distribution for
3901.6Skleinkone example.
3911.2Sperry
3921.2SperryNames normally have the form AREA/LOCATION, where AREA is the name
3931.2Sperryof a continent or ocean, and LOCATION is the name of a specific
3941.2Sperrylocation within that region.  North and South America share the same
3951.14Schristosarea, 'America'.  Typical names are 'Africa/Cairo', 'America/New_York',
3961.14Schristosand 'Pacific/Honolulu'.
3971.2Sperry
3981.2SperryHere are the general rules used for choosing location names,
3991.2Sperryin decreasing order of importance:
4001.2Sperry
4011.6Skleink	Use only valid POSIX file name components (i.e., the parts of
4021.14Schristos		names other than '/').  Do not use the file name
4031.14Schristos		components '.' and '..'.  Within a file name component,
4041.14Schristos		use only ASCII letters, '.', '-' and '_'.  Do not use
4051.6Skleink		digits, as that might create an ambiguity with POSIX
4061.6Skleink		TZ strings.  A file name component must not exceed 14
4071.14Schristos		characters or start with '-'.  E.g., prefer 'Brunei'
4081.15Schristos		to 'Bandar_Seri_Begawan'.  Exceptions: see the discussion
4091.15Schristos		of legacy names below.
4101.14Schristos	A name must not be empty, or contain '//', or start or end with '/'.
4111.13Schristos	Do not use names that differ only in case.  Although the reference
4121.14Schristos		implementation is case-sensitive, some other implementations
4131.13Schristos		are not, and they would mishandle names differing only in case.
4141.14Schristos	If one name A is an initial prefix of another name AB (ignoring case),
4151.14Schristos		then B must not start with '/', as a regular file cannot have
4161.14Schristos		the same name as a directory in POSIX.  For example,
4171.14Schristos		'America/New_York' precludes 'America/New_York/Bronx'.
4181.13Schristos	Uninhabited regions like the North Pole and Bouvet Island
4191.9Smlelstv		do not need locations, since local time is not defined there.
4201.14Schristos	There should typically be at least one name for each ISO 3166-1
4211.14Schristos		officially assigned two-letter code for an inhabited country
4221.14Schristos		or territory.
4231.13Schristos	If all the clocks in a region have agreed since 1970,
4241.2Sperry		don't bother to include more than one location
4251.2Sperry		even if subregions' clocks disagreed before 1970.
4261.2Sperry		Otherwise these tables would become annoyingly large.
4271.2Sperry	If a name is ambiguous, use a less ambiguous alternative;
4281.15Schristos		e.g. many cities are named San José and Georgetown, so
4291.14Schristos		prefer 'Costa_Rica' to 'San_Jose' and 'Guyana' to 'Georgetown'.
4301.2Sperry	Keep locations compact.  Use cities or small islands, not countries
4311.2Sperry		or regions, so that any future time zone changes do not split
4321.14Schristos		locations into different time zones.  E.g. prefer 'Paris'
4331.14Schristos		to 'France', since France has had multiple time zones.
4341.14Schristos	Use mainstream English spelling, e.g. prefer 'Rome' to 'Roma', and
4351.15Schristos		prefer 'Athens' to the Greek 'Αθήνα' or the Romanized 'Athína'.
4361.6Skleink		The POSIX file name restrictions encourage this rule.
4371.13Schristos	Use the most populous among locations in a zone,
4381.14Schristos		e.g. prefer 'Shanghai' to 'Beijing'.  Among locations with
4391.2Sperry		similar populations, pick the best-known location,
4401.14Schristos		e.g. prefer 'Rome' to 'Milan'.
4411.14Schristos	Use the singular form, e.g. prefer 'Canary' to 'Canaries'.
4421.14Schristos	Omit common suffixes like '_Islands' and '_City', unless that
4431.14Schristos		would lead to ambiguity.  E.g. prefer 'Cayman' to
4441.14Schristos		'Cayman_Islands' and 'Guatemala' to 'Guatemala_City',
4451.14Schristos		but prefer 'Mexico_City' to 'Mexico' because the country
4461.2Sperry		of Mexico has several time zones.
4471.14Schristos	Use '_' to represent a space.
4481.14Schristos	Omit '.' from abbreviations in names, e.g. prefer 'St_Helena'
4491.14Schristos		to 'St._Helena'.
4501.5Skleink	Do not change established names if they only marginally
4511.5Skleink		violate the above rules.  For example, don't change
4521.14Schristos		the existing name 'Rome' to 'Milan' merely because
4531.5Skleink		Milan's population has grown to be somewhat greater
4541.5Skleink		than Rome's.
4551.14Schristos	If a name is changed, put its old spelling in the 'backward' file.
4561.13Schristos		This means old spellings will continue to work.
4571.2Sperry
4581.15SchristosThe file 'zone1970.tab' lists geographical locations used to name time
4591.14Schristoszone rule files.  It is intended to be an exhaustive list of names
4601.14Schristosfor geographic regions as described above; this is a subset of the
4611.15Schristosnames in the data.  Although a 'zone1970.tab' location's longitude
4621.14Schristoscorresponds to its LMT offset with one hour for every 15 degrees east
4631.14Schristoslongitude, this relationship is not exact.
4641.2Sperry
4651.2SperryOlder versions of this package used a different naming scheme,
4661.2Sperryand these older names are still supported.
4671.14SchristosSee the file 'backward' for most of these older names
4681.15Schristos(e.g., 'US/Eastern' instead of 'America/New_York').
4691.2SperryThe other old-fashioned names still supported are
4701.14Schristos'WET', 'CET', 'MET', and 'EET' (see the file 'europe').
4711.2Sperry
4721.15SchristosOlder versions of this package defined legacy names that are
4731.15Schristosincompatible with the first rule of location names, but which are
4741.15Schristosstill supported.  These legacy names are mostly defined in the file
4751.15Schristos'etcetera'.  Also, the file 'backward' defines the legacy names
4761.15Schristos'GMT0', 'GMT-0', 'GMT+0' and 'Canada/East-Saskatchewan', and the file
4771.15Schristos'northamerica' defines the legacy names 'EST5EDT', 'CST6CDT',
4781.15Schristos'MST7MDT', and 'PST8PDT'.
4791.15Schristos
4801.15SchristosExcluding 'backward' should not affect the other data.  If
4811.15Schristos'backward' is excluded, excluding 'etcetera' should not affect the
4821.15Schristosremaining data.
4831.15Schristos
4841.2Sperry
4851.2Sperry----- Time zone abbreviations -----
4861.2Sperry
4871.2SperryWhen this package is installed, it generates time zone abbreviations
4881.14Schristoslike 'EST' to be compatible with human tradition and POSIX.
4891.2SperryHere are the general rules used for choosing time zone abbreviations,
4901.2Sperryin decreasing order of importance:
4911.2Sperry
4921.6Skleink	Use abbreviations that consist of three or more ASCII letters.
4931.2Sperry		Previous editions of this database also used characters like
4941.2Sperry		' ' and '?', but these characters have a special meaning to
4951.2Sperry		the shell and cause commands like
4961.2Sperry			set `date`
4971.6Skleink		to have unexpected effects.
4981.6Skleink		Previous editions of this rule required upper-case letters,
4991.6Skleink		but the Congressman who introduced Chamorro Standard Time
5001.6Skleink		preferred "ChST", so the rule has been relaxed.
5011.6Skleink
5021.6Skleink		This rule guarantees that all abbreviations could have
5031.9Smlelstv		been specified by a POSIX TZ string.  POSIX
5041.6Skleink		requires at least three characters for an
5051.9Smlelstv		abbreviation.  POSIX through 2000 says that an abbreviation
5061.6Skleink		cannot start with ':', and cannot contain ',', '-',
5071.9Smlelstv		'+', NUL, or a digit.  POSIX from 2001 on changes this
5081.9Smlelstv		rule to say that an abbreviation can contain only '-', '+',
5091.9Smlelstv		and alphanumeric characters from the portable character set
5101.9Smlelstv		in the current locale.  To be portable to both sets of
5111.6Skleink		rules, an abbreviation must therefore use only ASCII
5121.9Smlelstv		letters.
5131.6Skleink
5141.2Sperry	Use abbreviations that are in common use among English-speakers,
5151.14Schristos		e.g. 'EST' for Eastern Standard Time in North America.
5161.2Sperry		We assume that applications translate them to other languages
5171.2Sperry		as part of the normal localization process; for example,
5181.14Schristos		a French application might translate 'EST' to 'HNE'.
5191.6Skleink
5201.2Sperry	For zones whose times are taken from a city's longitude, use the
5211.14Schristos		traditional xMT notation, e.g. 'PMT' for Paris Mean Time.
5221.14Schristos		The only name like this in current use is 'GMT'.
5231.6Skleink
5241.2Sperry	If there is no common English abbreviation, abbreviate the English
5251.2Sperry		translation of the usual phrase used by native speakers.
5261.2Sperry		If this is not available or is a phrase mentioning the country
5271.14Schristos		(e.g. "Cape Verde Time"), then:
5281.2Sperry
5291.13Schristos		When a country is identified with a single or principal zone,
5301.14Schristos			append 'T' to the country's ISO	code, e.g. 'CVT' for
5311.14Schristos			Cape Verde Time.  For summer time append 'ST';
5321.14Schristos			for double summer time append 'DST'; etc.
5331.13Schristos		Otherwise, take the first three letters of an English place
5341.13Schristos			name identifying each zone and append 'T', 'ST', etc.
5351.13Schristos			as before; e.g. 'VLAST' for VLAdivostok Summer Time.
5361.2Sperry
5371.14Schristos	Use 'LMT' for local mean time of locations before the introduction
5381.14Schristos		of standard time; see "Scope of the tz database".
5391.14Schristos
5401.14Schristos	Use UT (with time zone abbreviation 'zzz') for locations while
5411.14Schristos		uninhabited.  The 'zzz' mnemonic is that these locations are,
5421.9Smlelstv		in some sense, asleep.
5431.6Skleink
5441.2SperryApplication writers should note that these abbreviations are ambiguous
5451.15Schristosin practice: e.g. 'CST' has a different meaning in China than
5461.2Sperryit does in the United States.  In new applications, it's often better
5471.15Schristosto use numeric UT offsets like '-0600' instead of time zone
5481.15Schristosabbreviations like 'CST'; this avoids the ambiguity.
5491.4Skleink
5501.4Skleink
5511.4Skleink----- Calendrical issues -----
5521.4Skleink
5531.4SkleinkCalendrical issues are a bit out of scope for a time zone database,
5541.4Skleinkbut they indicate the sort of problems that we would run into if we
5551.4Skleinkextended the time zone database further into the past.  An excellent
5561.10Schristosresource in this area is Nachum Dershowitz and Edward M. Reingold,
5571.15SchristosCalendrical Calculations: Third Edition, Cambridge University Press (2008)
5581.15Schristos<http://emr.cs.iit.edu/home/reingold/calendar-book/third-edition/>.
5591.15SchristosOther information and sources are given below.  They sometimes disagree.
5601.4Skleink
5611.4Skleink
5621.4SkleinkFrance
5631.4Skleink
5641.4SkleinkGregorian calendar adopted 1582-12-20.
5651.4SkleinkFrench Revolutionary calendar used 1793-11-24 through 1805-12-31,
5661.4Skleinkand (in Paris only) 1871-05-06 through 1871-05-23.
5671.4Skleink
5681.4Skleink
5691.4SkleinkRussia
5701.4Skleink
5711.9SmlelstvFrom Chris Carrier (1996-12-02):
5721.14SchristosOn 1929-10-01 the Soviet Union instituted an "Eternal Calendar"
5731.4Skleinkwith 30-day months plus 5 holidays, with a 5-day week.
5741.4SkleinkOn 1931-12-01 it changed to a 6-day week; in 1934 it reverted to the
5751.4SkleinkGregorian calendar while retaining the 6-day week; on 1940-06-27 it
5761.4Skleinkreverted to the 7-day week.  With the 6-day week the usual days
5771.4Skleinkoff were the 6th, 12th, 18th, 24th and 30th of the month.
5781.4Skleink(Source: Evitiar Zerubavel, _The Seven Day Circle_)
5791.4Skleink
5801.4Skleink
5811.4SkleinkMark Brader reported a similar story in "The Book of Calendars", edited
5821.4Skleinkby Frank Parise (1982, Facts on File, ISBN 0-8719-6467-8), page 377.  But:
5831.4Skleink
5841.4SkleinkFrom: Petteri Sulonen (via Usenet)
5851.4SkleinkDate: 14 Jan 1999 00:00:00 GMT
5861.9Smlelstv...
5871.4Skleink
5881.15SchristosIf your source is correct, how come documents between 1929 and 1940 were
5891.4Skleinkstill dated using the conventional, Gregorian calendar?
5901.4Skleink
5911.4SkleinkI can post a scan of a document dated December 1, 1934, signed by
5921.4SkleinkYenukidze, the secretary, on behalf of Kalinin, the President of the
5931.4SkleinkExecutive Committee of the Supreme Soviet, if you like.
5941.4Skleink
5951.4Skleink
5961.4Skleink
5971.4SkleinkSweden (and Finland)
5981.4Skleink
5991.9SmlelstvFrom: Mark Brader
6001.15SchristosSubject: Re: Gregorian reform - a part of locale?
6011.15Schristos<news:1996Jul6.012937.29190@sq.com>
6021.4SkleinkDate: 1996-07-06
6031.4Skleink
6041.4SkleinkIn 1700, Denmark made the transition from Julian to Gregorian.  Sweden
6051.4Skleinkdecided to *start* a transition in 1700 as well, but rather than have one of
6061.4Skleinkthose unsightly calendar gaps :-), they simply decreed that the next leap
6071.15Schristosyear after 1696 would be in 1744 - putting the whole country on a calendar
6081.4Skleinkdifferent from both Julian and Gregorian for a period of 40 years.
6091.4Skleink
6101.4SkleinkHowever, in 1704 something went wrong and the plan was not carried through;
6111.4Skleinkthey did, after all, have a leap year that year.  And one in 1708.  In 1712
6121.4Skleinkthey gave it up and went back to Julian, putting 30 days in February that
6131.4Skleinkyear!...
6141.4Skleink
6151.4SkleinkThen in 1753, Sweden made the transition to Gregorian in the usual manner,
6161.4Skleinkgetting there only 13 years behind the original schedule.
6171.4Skleink
6181.4Skleink(A previous posting of this story was challenged, and Swedish readers
6191.15Schristosproduced the following references to support it: "Tideräkning och historia"
6201.15Schristosby Natanael Beckman (1924) and "Tid, en bok om tideräkning och
6211.15Schristoskalenderväsen" by Lars-Olof Lodén (1968).
6221.4Skleink
6231.4Skleink
6241.4SkleinkGrotefend's data
6251.4Skleink
6261.9SmlelstvFrom: "Michael Palmer" [with one obvious typo fixed]
6271.4SkleinkSubject: Re: Gregorian Calendar (was Re: Another FHC related question
6281.4SkleinkNewsgroups: soc.genealogy.german
6291.4SkleinkDate: Tue, 9 Feb 1999 02:32:48 -800
6301.9Smlelstv...
6311.4Skleink
6321.6SkleinkThe following is a(n incomplete) listing, arranged chronologically, of
6331.6SkleinkEuropean states, with the date they converted from the Julian to the
6341.4SkleinkGregorian calendar:
6351.4Skleink
6361.4Skleink04/15 Oct 1582 - Italy (with exceptions), Spain, Portugal, Poland (Roman
6371.4Skleink                 Catholics and Danzig only)
6381.4Skleink09/20 Dec 1582 - France, Lorraine
6391.4Skleink
6401.4Skleink21 Dec 1582/
6411.4Skleink   01 Jan 1583 - Holland, Brabant, Flanders, Hennegau
6421.15Schristos10/21 Feb 1583 - bishopric of Liege (Lüttich)
6431.4Skleink13/24 Feb 1583 - bishopric of Augsburg
6441.4Skleink04/15 Oct 1583 - electorate of Trier
6451.4Skleink05/16 Oct 1583 - Bavaria, bishoprics of Freising, Eichstedt, Regensburg,
6461.4Skleink                 Salzburg, Brixen
6471.15Schristos13/24 Oct 1583 - Austrian Oberelsaß and Breisgau
6481.4Skleink20/31 Oct 1583 - bishopric of Basel
6491.15Schristos02/13 Nov 1583 - duchy of Jülich-Berg
6501.15Schristos02/13 Nov 1583 - electorate and city of Köln
6511.15Schristos04/15 Nov 1583 - bishopric of Würzburg
6521.4Skleink11/22 Nov 1583 - electorate of Mainz
6531.4Skleink16/27 Nov 1583 - bishopric of Strassburg and the margraviate of Baden
6541.15Schristos17/28 Nov 1583 - bishopric of Münster and duchy of Cleve
6551.4Skleink14/25 Dec 1583 - Steiermark
6561.4Skleink
6571.4Skleink06/17 Jan 1584 - Austria and Bohemia
6581.15Schristos11/22 Jan 1584 - Lucerne, Uri, Schwyz, Zug, Freiburg, Solothurn
6591.4Skleink12/23 Jan 1584 - Silesia and the Lausitz
6601.4Skleink22 Jan/
6611.4Skleink   02 Feb 1584 - Hungary (legally on 21 Oct 1587)
6621.4Skleink      Jun 1584 - Unterwalden
6631.4Skleink01/12 Jul 1584 - duchy of Westfalen
6641.4Skleink
6651.4Skleink16/27 Jun 1585 - bishopric of Paderborn
6661.4Skleink
6671.4Skleink14/25 Dec 1590 - Transylvania
6681.4Skleink
6691.4Skleink22 Aug/
6701.4Skleink   02 Sep 1612 - duchy of Prussia
6711.4Skleink
6721.4Skleink13/24 Dec 1614 - Pfalz-Neuburg
6731.4Skleink
6741.4Skleink          1617 - duchy of Kurland (reverted to the Julian calendar in
6751.4Skleink                 1796)
6761.4Skleink
6771.15Schristos          1624 - bishopric of Osnabrück
6781.4Skleink
6791.4Skleink          1630 - bishopric of Minden
6801.4Skleink
6811.4Skleink15/26 Mar 1631 - bishopric of Hildesheim
6821.4Skleink
6831.4Skleink          1655 - Kanton Wallis
6841.4Skleink
6851.4Skleink05/16 Feb 1682 - city of Strassburg
6861.4Skleink
6871.4Skleink18 Feb/
6881.4Skleink   01 Mar 1700 - Protestant Germany (including Swedish possessions in
6891.4Skleink                 Germany), Denmark, Norway
6901.4Skleink30 Jun/
6911.4Skleink   12 Jul 1700 - Gelderland, Zutphen
6921.4Skleink10 Nov/
6931.4Skleink   12 Dec 1700 - Utrecht, Overijssel
6941.4Skleink
6951.4Skleink31 Dec 1700/
6961.15Schristos   12 Jan 1701 - Friesland, Groningen, Zürich, Bern, Basel, Geneva,
6971.4Skleink                 Turgau, and Schaffhausen
6981.4Skleink
6991.4Skleink          1724 - Glarus, Appenzell, and the city of St. Gallen
7001.4Skleink
7011.4Skleink01 Jan 1750    - Pisa and Florence
7021.4Skleink
7031.4Skleink02/14 Sep 1752 - Great Britain
7041.4Skleink
7051.4Skleink17 Feb/
7061.4Skleink   01 Mar 1753 - Sweden
7071.4Skleink
7081.15Schristos1760-1812      - Graubünden
7091.4Skleink
7101.6SkleinkThe Russian empire (including Finland and the Baltic states) did not
7111.4Skleinkconvert to the Gregorian calendar until the Soviet revolution of 1917.
7121.4Skleink
7131.16SchristosSource: H. Grotefend, _Taschenbuch der Zeitrechnung des deutschen
7141.6SkleinkMittelalters und der Neuzeit_, herausgegeben von Dr. O. Grotefend
7151.16Schristos(Hannover: Hahnsche Buchhandlung, 1941), pp. 26-28.
7161.8Skleink
7171.8Skleink
7181.8Skleink----- Time and time zones on Mars -----
7191.8Skleink
7201.17SchristosSome people's work schedules use Mars time.  Jet Propulsion Laboratory
7211.17Schristos(JPL) coordinators have kept Mars time on and off at least since 1997
7221.17Schristosfor the Mars Pathfinder mission.  Some of their family members have
7231.17Schristosalso adapted to Mars time.  Dozens of special Mars watches were built
7241.17Schristosfor JPL workers who kept Mars time during the Mars Exploration
7251.8SkleinkRovers mission (2004).  These timepieces look like normal Seikos and
7261.8SkleinkCitizens but use Mars seconds rather than terrestrial seconds.
7271.8Skleink
7281.8SkleinkA Mars solar day is called a "sol" and has a mean period equal to
7291.8Skleinkabout 24 hours 39 minutes 35.244 seconds in terrestrial time.  It is
7301.8Skleinkdivided into a conventional 24-hour clock, so each Mars second equals
7311.8Skleinkabout 1.02749125 terrestrial seconds.
7321.8Skleink
7331.8SkleinkThe prime meridian of Mars goes through the center of the crater
7341.8SkleinkAiry-0, named in honor of the British astronomer who built the
7351.8SkleinkGreenwich telescope that defines Earth's prime meridian.  Mean solar
7361.8Skleinktime on the Mars prime meridian is called Mars Coordinated Time (MTC).
7371.8Skleink
7381.8SkleinkEach landed mission on Mars has adopted a different reference for
7391.8Skleinksolar time keeping, so there is no real standard for Mars time zones.
7401.8SkleinkFor example, the Mars Exploration Rover project (2004) defined two
7411.8Skleinktime zones "Local Solar Time A" and "Local Solar Time B" for its two
7421.8Skleinkmissions, each zone designed so that its time equals local true solar
7431.8Skleinktime at approximately the middle of the nominal mission.  Such a "time
7441.8Skleinkzone" is not particularly suited for any application other than the
7451.8Skleinkmission itself.
7461.8Skleink
7471.8SkleinkMany calendars have been proposed for Mars, but none have achieved
7481.8Skleinkwide acceptance.  Astronomers often use Mars Sol Date (MSD) which is a
7491.8Skleinksequential count of Mars solar days elapsed since about 1873-12-29
7501.8Skleink12:00 GMT.
7511.8Skleink
7521.8SkleinkThe tz database does not currently support Mars time, but it is
7531.8Skleinkdocumented here in the hopes that support will be added eventually.
7541.8Skleink
7551.8SkleinkSources:
7561.8Skleink
7571.8SkleinkMichael Allison and Robert Schmunk,
7581.8Skleink"Technical Notes on Mars Solar Time as Adopted by the Mars24 Sunclock"
7591.13Schristos<http://www.giss.nasa.gov/tools/mars24/help/notes.html> (2012-08-08).
7601.8Skleink
7611.8SkleinkJia-Rui Chong, "Workdays Fit for a Martian", Los Angeles Times
7621.13Schristos<http://articles.latimes.com/2004/jan/14/science/sci-marstime14>
7631.8Skleink(2004-01-14), pp A1, A20-A21.
7641.15Schristos
7651.17SchristosTom Chmielewski, "Jet Lag Is Worse on Mars", The Atlantic (2015-02-26)
7661.17Schristos<http://www.theatlantic.com/technology/archive/2015/02/jet-lag-is-worse-on-mars/386033/>
7671.15Schristos
7681.15Schristos-----
7691.15SchristosLocal Variables:
7701.15Schristoscoding: utf-8
7711.15SchristosEnd:
772