Home | History | Annotate | Line # | Download | only in time
Theory revision 1.1.1.7
      1  1.1.1.7  kleink @(#)Theory	7.13
      2      1.1     jtc 
      3  1.1.1.3     jtc 
      4  1.1.1.3     jtc ----- Outline -----
      5  1.1.1.3     jtc 
      6  1.1.1.3     jtc 	Time and date functions
      7  1.1.1.3     jtc 	Names of time zone regions
      8  1.1.1.3     jtc 	Time zone abbreviations
      9  1.1.1.5  kleink 	Calendrical issues
     10  1.1.1.3     jtc 
     11  1.1.1.3     jtc 
     12  1.1.1.3     jtc ----- Time and date functions -----
     13  1.1.1.3     jtc 
     14  1.1.1.3     jtc These time and date functions are upwards compatible with POSIX.1,
     15  1.1.1.3     jtc an international standard for Unix-like systems.
     16  1.1.1.3     jtc As of this writing, the current edition of POSIX.1 is:
     17  1.1.1.3     jtc 
     18  1.1.1.3     jtc   Information technology --Portable Operating System Interface (POSIX (R))
     19  1.1.1.3     jtc   -- Part 1: System Application Program Interface (API) [C Language]
     20  1.1.1.3     jtc   ISO/IEC 9945-1:1996
     21  1.1.1.3     jtc   ANSI/IEEE Std 1003.1, 1996 Edition
     22  1.1.1.3     jtc   1996-07-12
     23  1.1.1.3     jtc 
     24  1.1.1.3     jtc POSIX.1 has the following properties and limitations.
     25  1.1.1.3     jtc 
     26  1.1.1.3     jtc *	In POSIX.1, time display in a process is controlled by the
     27  1.1.1.3     jtc 	environment variable TZ.  Unfortunately, the POSIX.1 TZ string takes
     28  1.1.1.3     jtc 	a form that is hard to describe and is error-prone in practice.
     29  1.1.1.3     jtc 	Also, POSIX.1 TZ strings can't deal with other (for example, Israeli)
     30  1.1.1.3     jtc 	daylight saving time rules, or situations where more than two
     31      1.1     jtc 	time zone abbreviations are used in an area.
     32      1.1     jtc 
     33  1.1.1.3     jtc 	The POSIX.1 TZ string takes the following form:
     34  1.1.1.3     jtc 
     35  1.1.1.3     jtc 		stdoffset[dst[offset],date[/time],date[/time]]
     36  1.1.1.3     jtc 
     37  1.1.1.3     jtc 	where:
     38  1.1.1.7  kleink 
     39  1.1.1.3     jtc 	std and dst
     40  1.1.1.3     jtc 		are 3 or more characters specifying the standard
     41  1.1.1.3     jtc 		and daylight saving time (DST) zone names.
     42  1.1.1.3     jtc 	offset
     43  1.1.1.3     jtc 		is of the form `[-]hh:[mm[:ss]]' and specifies the
     44  1.1.1.3     jtc 		offset west of UTC.  The default DST offset is one hour
     45  1.1.1.3     jtc 		ahead of standard time.
     46  1.1.1.3     jtc 	date[/time],date[/time]
     47  1.1.1.3     jtc 		specifies the beginning and end of DST.  If this is absent,
     48  1.1.1.3     jtc 		the system supplies its own rules for DST, and these can
     49  1.1.1.3     jtc 		differ from year to year; typically US DST rules are used.
     50  1.1.1.3     jtc 	time
     51  1.1.1.3     jtc 		takes the form `hh:[mm[:ss]]' and defaults to 02:00.
     52  1.1.1.3     jtc 	date
     53  1.1.1.3     jtc 		takes one of the following forms:
     54  1.1.1.3     jtc 		Jn (1<=n<=365)
     55  1.1.1.3     jtc 			origin-1 day number not counting February 29
     56  1.1.1.3     jtc 		n (0<=n<=365)
     57  1.1.1.3     jtc 			origin-0 day number counting February 29 if present
     58  1.1.1.3     jtc 		Mm.n.d (0[Sunday]<=d<=6[Saturday], 1<=n<=5, 1<=m<=12)
     59  1.1.1.3     jtc 			for the dth day of week n of month m of the year,
     60  1.1.1.3     jtc 			where week 1 is the first week in which day d appears,
     61  1.1.1.3     jtc 			and `5' stands for the last week in which day d appears
     62  1.1.1.3     jtc 			(which may be either the 4th or 5th week).
     63  1.1.1.3     jtc 
     64  1.1.1.3     jtc *	In POSIX.1, when a TZ value like "EST5EDT" is parsed,
     65  1.1.1.3     jtc 	typically the current US DST rules are used,
     66  1.1.1.3     jtc 	but this means that the US DST rules are compiled into each program
     67  1.1.1.3     jtc 	that does time conversion.  This means that when US time conversion
     68      1.1     jtc 	rules change (as in the United States in 1987), all programs that
     69      1.1     jtc 	do time conversion must be recompiled to ensure proper results.
     70      1.1     jtc 
     71  1.1.1.3     jtc *	In POSIX.1, there's no tamper-proof way for a process to learn the
     72      1.1     jtc 	system's best idea of local wall clock.  (This is important for
     73      1.1     jtc 	applications that an administrator wants used only at certain times--
     74      1.1     jtc 	without regard to whether the user has fiddled the "TZ" environment
     75  1.1.1.4     jtc 	variable.  While an administrator can "do everything in UTC" to get
     76      1.1     jtc 	around the problem, doing so is inconvenient and precludes handling
     77  1.1.1.3     jtc 	daylight saving time shifts--as might be required to limit phone
     78      1.1     jtc 	calls to off-peak hours.)
     79      1.1     jtc 
     80  1.1.1.3     jtc *	POSIX.1 requires that systems ignore leap seconds.
     81      1.1     jtc 
     82  1.1.1.3     jtc These are the extensions that have been made to the POSIX.1 functions:
     83      1.1     jtc 
     84      1.1     jtc *	The "TZ" environment variable is used in generating the name of a file
     85      1.1     jtc 	from which time zone information is read (or is interpreted a la
     86      1.1     jtc 	POSIX); "TZ" is no longer constrained to be a three-letter time zone
     87      1.1     jtc 	name followed by a number of hours and an optional three-letter
     88      1.1     jtc 	daylight time zone name.  The daylight saving time rules to be used
     89      1.1     jtc 	for a particular time zone are encoded in the time zone file;
     90      1.1     jtc 	the format of the file allows U.S., Australian, and other rules to be
     91      1.1     jtc 	encoded, and allows for situations where more than two time zone
     92      1.1     jtc 	abbreviations are used.
     93      1.1     jtc 
     94      1.1     jtc 	It was recognized that allowing the "TZ" environment variable to
     95  1.1.1.2     jtc 	take on values such as "America/New_York" might cause "old" programs
     96      1.1     jtc 	(that expect "TZ" to have a certain form) to operate incorrectly;
     97      1.1     jtc 	consideration was given to using some other environment variable
     98      1.1     jtc 	(for example, "TIMEZONE") to hold the string used to generate the
     99      1.1     jtc 	time zone information file name.  In the end, however, it was decided
    100      1.1     jtc 	to continue using "TZ":  it is widely used for time zone purposes;
    101      1.1     jtc 	separately maintaining both "TZ" and "TIMEZONE" seemed a nuisance;
    102      1.1     jtc 	and systems where "new" forms of "TZ" might cause problems can simply
    103      1.1     jtc 	use TZ values such as "EST5EDT" which can be used both by
    104      1.1     jtc 	"new" programs (a la POSIX) and "old" programs (as zone names and
    105      1.1     jtc 	offsets).
    106      1.1     jtc 
    107      1.1     jtc *	To handle places where more than two time zone abbreviations are used,
    108      1.1     jtc 	the functions "localtime" and "gmtime" set tzname[tmp->tm_isdst]
    109      1.1     jtc 	(where "tmp" is the value the function returns) to the time zone
    110  1.1.1.3     jtc 	abbreviation to be used.  This differs from POSIX.1, where the elements
    111      1.1     jtc 	of tzname are only changed as a result of calls to tzset.
    112      1.1     jtc 
    113      1.1     jtc *	Since the "TZ" environment variable can now be used to control time
    114      1.1     jtc 	conversion, the "daylight" and "timezone" variables are no longer
    115  1.1.1.3     jtc 	needed.  (These variables are defined and set by "tzset"; however, their
    116      1.1     jtc 	values will not be used by "localtime.")
    117      1.1     jtc 
    118      1.1     jtc *	The "localtime" function has been set up to deliver correct results
    119      1.1     jtc 	for near-minimum or near-maximum time_t values.  (A comment in the
    120      1.1     jtc 	source code tells how to get compatibly wrong results).
    121      1.1     jtc 
    122      1.1     jtc *	A function "tzsetwall" has been added to arrange for the system's
    123      1.1     jtc 	best approximation to local wall clock time to be delivered by
    124      1.1     jtc 	subsequent calls to "localtime."  Source code for portable
    125      1.1     jtc 	applications that "must" run on local wall clock time should call
    126  1.1.1.2     jtc 	"tzsetwall();" if such code is moved to "old" systems that don't
    127  1.1.1.2     jtc 	provide tzsetwall, you won't be able to generate an executable program.
    128      1.1     jtc 	(These time zone functions also arrange for local wall clock time to be
    129      1.1     jtc 	used if tzset is called--directly or indirectly--and there's no "TZ"
    130      1.1     jtc 	environment variable; portable applications should not, however, rely
    131      1.1     jtc 	on this behavior since it's not the way SVR2 systems behave.)
    132      1.1     jtc 
    133  1.1.1.3     jtc *	These functions can account for leap seconds, thanks to Bradley White
    134  1.1.1.3     jtc 	(bww (a] k.cs.cmu.edu).
    135  1.1.1.3     jtc 
    136  1.1.1.3     jtc Points of interest to folks with other systems:
    137  1.1.1.3     jtc 
    138  1.1.1.3     jtc *	This package is already part of many POSIX-compliant hosts,
    139  1.1.1.3     jtc 	including BSD, HP, Linux, Network Appliance, SCO, SGI, and Sun.
    140  1.1.1.3     jtc 	On such hosts, the primary use of this package
    141  1.1.1.3     jtc 	is to update obsolete time zone rule tables.
    142  1.1.1.3     jtc 	To do this, you may need to compile the time zone compiler
    143  1.1.1.3     jtc 	`zic' supplied with this package instead of using the system `zic',
    144  1.1.1.3     jtc 	since the format of zic's input changed slightly in late 1994,
    145  1.1.1.3     jtc 	and many vendors still do not support the new input format.
    146      1.1     jtc 
    147  1.1.1.3     jtc *	The Unix Version 7 "timezone" function is not present in this package;
    148      1.1     jtc 	it's impossible to reliably map timezone's arguments (a "minutes west
    149      1.1     jtc 	of GMT" value and a "daylight saving time in effect" flag) to a
    150      1.1     jtc 	time zone abbreviation, and we refuse to guess.
    151      1.1     jtc 	Programs that in the past used the timezone function may now examine
    152      1.1     jtc 	tzname[localtime(&clock)->tm_isdst] to learn the correct time
    153  1.1.1.2     jtc 	zone abbreviation to use.  Alternatively, use
    154  1.1.1.2     jtc 	localtime(&clock)->tm_zone if this has been enabled.
    155      1.1     jtc 
    156  1.1.1.3     jtc *	The 4.2BSD gettimeofday function is not used in this package.
    157  1.1.1.3     jtc 	This formerly let users obtain the current UTC offset and DST flag,
    158  1.1.1.3     jtc 	but this functionality was removed in later versions of BSD.
    159  1.1.1.3     jtc 
    160  1.1.1.3     jtc *	In SVR2, time conversion fails for near-minimum or near-maximum
    161  1.1.1.4     jtc 	time_t values when doing conversions for places that don't use UTC.
    162  1.1.1.3     jtc 	This package takes care to do these conversions correctly.
    163      1.1     jtc 
    164  1.1.1.2     jtc The functions that are conditionally compiled if STD_INSPIRED is defined
    165  1.1.1.2     jtc should, at this point, be looked on primarily as food for thought.  They are
    166  1.1.1.2     jtc not in any sense "standard compatible"--some are not, in fact, specified in
    167  1.1.1.2     jtc *any* standard.  They do, however, represent responses of various authors to
    168      1.1     jtc standardization proposals.
    169      1.1     jtc 
    170      1.1     jtc Other time conversion proposals, in particular the one developed by folks at
    171      1.1     jtc Hewlett Packard, offer a wider selection of functions that provide capabilities
    172      1.1     jtc beyond those provided here.  The absence of such functions from this package
    173      1.1     jtc is not meant to discourage the development, standardization, or use of such
    174      1.1     jtc functions.  Rather, their absence reflects the decision to make this package
    175  1.1.1.3     jtc contain valid extensions to POSIX.1, to ensure its broad
    176      1.1     jtc acceptability.  If more powerful time conversion functions can be standardized,
    177      1.1     jtc so much the better.
    178  1.1.1.3     jtc 
    179  1.1.1.3     jtc 
    180  1.1.1.3     jtc ----- Names of time zone rule files -----
    181  1.1.1.3     jtc 
    182  1.1.1.7  kleink The time zone rule file naming conventions attempt to strike a balance
    183  1.1.1.7  kleink among the following goals:
    184  1.1.1.7  kleink 
    185  1.1.1.7  kleink  * Uniquely identify every national region where clocks have all
    186  1.1.1.7  kleink    agreed since 1970.  This is essential for the intended use: static
    187  1.1.1.7  kleink    clocks keeping local civil time.
    188  1.1.1.7  kleink 
    189  1.1.1.7  kleink  * Indicate to humans as to where that region is.  This simplifes use.
    190  1.1.1.7  kleink 
    191  1.1.1.7  kleink  * Be robust in the presence of political changes.  This reduces the
    192  1.1.1.7  kleink    number of updates and backward-compatibility hacks.  For example,
    193  1.1.1.7  kleink    names of countries are ordinarily not used, to avoid
    194  1.1.1.7  kleink    incompatibilities when countries change their name
    195  1.1.1.7  kleink    (e.g. Zaire->Congo) or when locations change countries
    196  1.1.1.7  kleink    (e.g. Hong Kong from UK colony to China).
    197  1.1.1.7  kleink 
    198  1.1.1.7  kleink  * Be portable to a wide variety of implementations.
    199  1.1.1.7  kleink    This promotes use of the technology.
    200  1.1.1.7  kleink 
    201  1.1.1.7  kleink  * Use a consistent naming convention over the entire world.
    202  1.1.1.7  kleink    This simplifies both use and maintenance.
    203  1.1.1.7  kleink 
    204  1.1.1.7  kleink This naming convention is not intended for use by inexperienced users
    205  1.1.1.7  kleink to select TZ values by themselves (though they can of course examine
    206  1.1.1.7  kleink and reuse existing settings).  Distributors should provide
    207  1.1.1.7  kleink documentation and/or a simple selection interface that explains the
    208  1.1.1.7  kleink names; see the 'tzselect' program supplied with this distribution for
    209  1.1.1.7  kleink one example.
    210  1.1.1.3     jtc 
    211  1.1.1.3     jtc Names normally have the form AREA/LOCATION, where AREA is the name
    212  1.1.1.3     jtc of a continent or ocean, and LOCATION is the name of a specific
    213  1.1.1.3     jtc location within that region.  North and South America share the same
    214  1.1.1.3     jtc area, `America'.  Typical names are `Africa/Cairo', `America/New_York',
    215  1.1.1.3     jtc and `Pacific/Honolulu'.
    216  1.1.1.3     jtc 
    217  1.1.1.3     jtc Here are the general rules used for choosing location names,
    218  1.1.1.3     jtc in decreasing order of importance:
    219  1.1.1.3     jtc 
    220  1.1.1.7  kleink 	Use only valid POSIX file name components (i.e., the parts of
    221  1.1.1.7  kleink 		names other than `/').  Within a file name component,
    222  1.1.1.7  kleink 		use only ASCII letters, `.', `-' and `_'.  Do not use
    223  1.1.1.7  kleink 		digits, as that might create an ambiguity with POSIX
    224  1.1.1.7  kleink 		TZ strings.  A file name component must not exceed 14
    225  1.1.1.7  kleink 		characters or start with `-'.  E.g., prefer `Brunei'
    226  1.1.1.7  kleink 		to `Bandar_Seri_Begawan'.
    227  1.1.1.3     jtc 	Include at least one location per time zone rule set per country.
    228  1.1.1.6  kleink 		One such location is enough.  Use ISO 3166 (see the file
    229  1.1.1.6  kleink 		iso3166.tab) to help decide whether something is a country.
    230  1.1.1.3     jtc 	If all the clocks in a country's region have agreed since 1970,
    231  1.1.1.3     jtc 		don't bother to include more than one location
    232  1.1.1.3     jtc 		even if subregions' clocks disagreed before 1970.
    233  1.1.1.3     jtc 		Otherwise these tables would become annoyingly large.
    234  1.1.1.3     jtc 	If a name is ambiguous, use a less ambiguous alternative;
    235  1.1.1.3     jtc 		e.g. many cities are named San Jose and Georgetown, so
    236  1.1.1.3     jtc 		prefer `Costa_Rica' to `San_Jose' and `Guyana' to `Georgetown'.
    237  1.1.1.3     jtc 	Keep locations compact.  Use cities or small islands, not countries
    238  1.1.1.3     jtc 		or regions, so that any future time zone changes do not split
    239  1.1.1.3     jtc 		locations into different time zones.  E.g. prefer `Paris'
    240  1.1.1.3     jtc 		to `France', since France has had multiple time zones.
    241  1.1.1.7  kleink 	Use mainstream English spelling, e.g. prefer `Rome' to `Roma', and
    242  1.1.1.3     jtc 		prefer `Athens' to the true name (which uses Greek letters).
    243  1.1.1.7  kleink 		The POSIX file name restrictions encourage this rule.
    244  1.1.1.3     jtc 	Use the most populous among locations in a country's time zone,
    245  1.1.1.3     jtc 		e.g. prefer `Shanghai' to `Beijing'.  Among locations with
    246  1.1.1.3     jtc 		similar populations, pick the best-known location,
    247  1.1.1.3     jtc 		e.g. prefer `Rome' to `Milan'.
    248  1.1.1.3     jtc 	Use the singular form, e.g. prefer `Canary' to `Canaries'.
    249  1.1.1.3     jtc 	Omit common suffixes like `_Islands' and `_City', unless that
    250  1.1.1.3     jtc 		would lead to ambiguity.  E.g. prefer `Cayman' to
    251  1.1.1.3     jtc 		`Cayman_Islands' and `Guatemala' to `Guatemala_City',
    252  1.1.1.3     jtc 		but prefer `Mexico_City' to `Mexico' because the country
    253  1.1.1.3     jtc 		of Mexico has several time zones.
    254  1.1.1.3     jtc 	Use `_' to represent a space.
    255  1.1.1.3     jtc 	Omit `.' from abbreviations in names, e.g. prefer `St_Helena'
    256  1.1.1.3     jtc 		to `St._Helena'.
    257  1.1.1.6  kleink 	Do not change established names if they only marginally
    258  1.1.1.6  kleink 		violate the above rules.  For example, don't change
    259  1.1.1.6  kleink 		the existing name `Rome' to `Milan' merely because
    260  1.1.1.6  kleink 		Milan's population has grown to be somewhat greater
    261  1.1.1.6  kleink 		than Rome's.
    262  1.1.1.6  kleink 	If a name is changed, put its old spelling in the `backward' file.
    263  1.1.1.3     jtc 
    264  1.1.1.3     jtc The file `zone.tab' lists the geographical locations used to name
    265  1.1.1.3     jtc time zone rule files.
    266  1.1.1.3     jtc 
    267  1.1.1.3     jtc Older versions of this package used a different naming scheme,
    268  1.1.1.3     jtc and these older names are still supported.
    269  1.1.1.6  kleink See the file `backward' for most of these older names
    270  1.1.1.3     jtc (e.g. `US/Eastern' instead of `America/New_York').
    271  1.1.1.3     jtc The other old-fashioned names still supported are
    272  1.1.1.3     jtc `WET', `CET', `MET', `EET' (see the file `europe'),
    273  1.1.1.3     jtc and `Factory' (see the file `factory').
    274  1.1.1.3     jtc 
    275  1.1.1.3     jtc 
    276  1.1.1.3     jtc ----- Time zone abbreviations -----
    277  1.1.1.3     jtc 
    278  1.1.1.3     jtc When this package is installed, it generates time zone abbreviations
    279  1.1.1.3     jtc like `EST' to be compatible with human tradition and POSIX.1.
    280  1.1.1.3     jtc Here are the general rules used for choosing time zone abbreviations,
    281  1.1.1.3     jtc in decreasing order of importance:
    282  1.1.1.3     jtc 
    283  1.1.1.7  kleink 	Use abbreviations that consist of three or more ASCII letters.
    284  1.1.1.3     jtc 		Previous editions of this database also used characters like
    285  1.1.1.3     jtc 		' ' and '?', but these characters have a special meaning to
    286  1.1.1.3     jtc 		the shell and cause commands like
    287  1.1.1.3     jtc 			set `date`
    288  1.1.1.7  kleink 		to have unexpected effects.
    289  1.1.1.7  kleink 		Previous editions of this rule required upper-case letters,
    290  1.1.1.7  kleink 		but the Congressman who introduced Chamorro Standard Time
    291  1.1.1.7  kleink 		preferred "ChST", so the rule has been relaxed.
    292  1.1.1.7  kleink 
    293  1.1.1.7  kleink 		This rule guarantees that all abbreviations could have
    294  1.1.1.7  kleink 		been specified by a POSIX.1 TZ string.  POSIX.1
    295  1.1.1.7  kleink 		requires at least three characters for an
    296  1.1.1.7  kleink 		abbreviation.  POSIX.1-1996 says that an abbreviation
    297  1.1.1.7  kleink 		cannot start with ':', and cannot contain ',', '-',
    298  1.1.1.7  kleink 		'+', NUL, or a digit.  Draft 7 of POSIX 1003.1-200x
    299  1.1.1.7  kleink 		changes this rule to say that an abbreviation can
    300  1.1.1.7  kleink 		contain only '-', '+', and alphanumeric characters in
    301  1.1.1.7  kleink 		the current locale.  To be portable to both sets of
    302  1.1.1.7  kleink 		rules, an abbreviation must therefore use only ASCII
    303  1.1.1.7  kleink 		letters, as these are the only letters that are
    304  1.1.1.7  kleink 		alphabetic in all locales.
    305  1.1.1.7  kleink 
    306  1.1.1.3     jtc 	Use abbreviations that are in common use among English-speakers,
    307  1.1.1.3     jtc 		e.g. `EST' for Eastern Standard Time in North America.
    308  1.1.1.3     jtc 		We assume that applications translate them to other languages
    309  1.1.1.3     jtc 		as part of the normal localization process; for example,
    310  1.1.1.3     jtc 		a French application might translate `EST' to `HNE'.
    311  1.1.1.7  kleink 
    312  1.1.1.3     jtc 	For zones whose times are taken from a city's longitude, use the
    313  1.1.1.3     jtc 		traditional xMT notation, e.g. `PMT' for Paris Mean Time.
    314  1.1.1.3     jtc 		The only name like this in current use is `GMT'.
    315  1.1.1.7  kleink 
    316  1.1.1.3     jtc 	If there is no common English abbreviation, abbreviate the English
    317  1.1.1.3     jtc 		translation of the usual phrase used by native speakers.
    318  1.1.1.3     jtc 		If this is not available or is a phrase mentioning the country
    319  1.1.1.3     jtc 		(e.g. ``Cape Verde Time''), then:
    320  1.1.1.3     jtc 
    321  1.1.1.3     jtc 		When a country has a single or principal time zone region,
    322  1.1.1.3     jtc 			append `T' to the country's ISO	code, e.g. `CVT' for
    323  1.1.1.3     jtc 			Cape Verde Time.  For summer time append `ST';
    324  1.1.1.3     jtc 			for double summer time append `DST'; etc.
    325  1.1.1.3     jtc 		When a country has multiple time zones, take the first three
    326  1.1.1.3     jtc 			letters of an English place name identifying each zone
    327  1.1.1.3     jtc 			and then append `T', `ST', etc. as before;
    328  1.1.1.3     jtc 			e.g. `VLAST' for VLAdivostok Summer Time.
    329  1.1.1.3     jtc 
    330  1.1.1.7  kleink 	Use "zzz" for locations while uninhabited.  The mnemonic is that
    331  1.1.1.7  kleink 		these locations are, in some sense, asleep.
    332  1.1.1.7  kleink 
    333  1.1.1.3     jtc Application writers should note that these abbreviations are ambiguous
    334  1.1.1.3     jtc in practice: e.g. `EST' has a different meaning in Australia than
    335  1.1.1.3     jtc it does in the United States.  In new applications, it's often better
    336  1.1.1.4     jtc to use numeric UTC offsets like `-0500' instead of time zone
    337  1.1.1.3     jtc abbreviations like `EST'; this avoids the ambiguity.
    338  1.1.1.5  kleink 
    339  1.1.1.5  kleink 
    340  1.1.1.5  kleink ----- Calendrical issues -----
    341  1.1.1.5  kleink 
    342  1.1.1.5  kleink Calendrical issues are a bit out of scope for a time zone database,
    343  1.1.1.5  kleink but they indicate the sort of problems that we would run into if we
    344  1.1.1.5  kleink extended the time zone database further into the past.  An excellent
    345  1.1.1.5  kleink resource in this area is Nachum Dershowitz and Edward M. Reingold,
    346  1.1.1.5  kleink <a href="http://emr.cs.uiuc.edu/home/reingold/calendar-book/index.shtml">
    347  1.1.1.5  kleink Calendrical Calculations
    348  1.1.1.5  kleink </a>, Cambridge University Press (1997).  Other information and
    349  1.1.1.5  kleink sources are given below.  They sometimes disagree.
    350  1.1.1.5  kleink 
    351  1.1.1.5  kleink 
    352  1.1.1.5  kleink France
    353  1.1.1.5  kleink 
    354  1.1.1.5  kleink Gregorian calendar adopted 1582-12-20.
    355  1.1.1.5  kleink French Revolutionary calendar used 1793-11-24 through 1805-12-31,
    356  1.1.1.5  kleink and (in Paris only) 1871-05-06 through 1871-05-23.
    357  1.1.1.5  kleink 
    358  1.1.1.5  kleink 
    359  1.1.1.5  kleink Russia
    360  1.1.1.5  kleink 
    361  1.1.1.5  kleink From Chris Carrier <72157.3334 (a] CompuServe.COM> (1996-12-02):
    362  1.1.1.5  kleink On 1929-10-01 the Soviet Union instituted an ``Eternal Calendar''
    363  1.1.1.5  kleink with 30-day months plus 5 holidays, with a 5-day week.
    364  1.1.1.5  kleink On 1931-12-01 it changed to a 6-day week; in 1934 it reverted to the
    365  1.1.1.5  kleink Gregorian calendar while retaining the 6-day week; on 1940-06-27 it
    366  1.1.1.5  kleink reverted to the 7-day week.  With the 6-day week the usual days
    367  1.1.1.5  kleink off were the 6th, 12th, 18th, 24th and 30th of the month.
    368  1.1.1.5  kleink (Source: Evitiar Zerubavel, _The Seven Day Circle_)
    369  1.1.1.5  kleink 
    370  1.1.1.5  kleink 
    371  1.1.1.5  kleink Mark Brader reported a similar story in "The Book of Calendars", edited
    372  1.1.1.5  kleink by Frank Parise (1982, Facts on File, ISBN 0-8719-6467-8), page 377.  But:
    373  1.1.1.5  kleink 
    374  1.1.1.5  kleink From: Petteri Sulonen (via Usenet)
    375  1.1.1.5  kleink Date: 14 Jan 1999 00:00:00 GMT
    376  1.1.1.5  kleink Message-ID: <Petteri.Sulonen-1401991626030001 (a] lapin-kulta.in.helsinki.fi>
    377  1.1.1.5  kleink 
    378  1.1.1.5  kleink If your source is correct, how come documents between 1929 -- 1940 were
    379  1.1.1.5  kleink still dated using the conventional, Gregorian calendar?
    380  1.1.1.5  kleink 
    381  1.1.1.5  kleink I can post a scan of a document dated December 1, 1934, signed by
    382  1.1.1.5  kleink Yenukidze, the secretary, on behalf of Kalinin, the President of the
    383  1.1.1.5  kleink Executive Committee of the Supreme Soviet, if you like.
    384  1.1.1.5  kleink 
    385  1.1.1.5  kleink 
    386  1.1.1.5  kleink 
    387  1.1.1.5  kleink Sweden (and Finland)
    388  1.1.1.5  kleink 
    389  1.1.1.5  kleink From: msb (a] sq.com (Mark Brader)
    390  1.1.1.5  kleink <a href="news:1996Jul6.012937.29190 (a] sq.com">
    391  1.1.1.5  kleink Subject: Re: Gregorian reform -- a part of locale?
    392  1.1.1.5  kleink </a>
    393  1.1.1.5  kleink Date: 1996-07-06
    394  1.1.1.5  kleink 
    395  1.1.1.5  kleink In 1700, Denmark made the transition from Julian to Gregorian.  Sweden
    396  1.1.1.5  kleink decided to *start* a transition in 1700 as well, but rather than have one of
    397  1.1.1.5  kleink those unsightly calendar gaps :-), they simply decreed that the next leap
    398  1.1.1.5  kleink year after 1696 would be in 1744 -- putting the whole country on a calendar
    399  1.1.1.5  kleink different from both Julian and Gregorian for a period of 40 years.
    400  1.1.1.5  kleink 
    401  1.1.1.5  kleink However, in 1704 something went wrong and the plan was not carried through;
    402  1.1.1.5  kleink they did, after all, have a leap year that year.  And one in 1708.  In 1712
    403  1.1.1.5  kleink they gave it up and went back to Julian, putting 30 days in February that
    404  1.1.1.5  kleink year!...
    405  1.1.1.5  kleink 
    406  1.1.1.5  kleink Then in 1753, Sweden made the transition to Gregorian in the usual manner,
    407  1.1.1.5  kleink getting there only 13 years behind the original schedule.
    408  1.1.1.5  kleink 
    409  1.1.1.5  kleink (A previous posting of this story was challenged, and Swedish readers
    410  1.1.1.5  kleink produced the following references to support it: "Tiderakning och historia"
    411  1.1.1.5  kleink by Natanael Beckman (1924) and "Tid, en bok om tiderakning och
    412  1.1.1.5  kleink kalendervasen" by Lars-Olof Lode'n (no date was given).)
    413  1.1.1.5  kleink 
    414  1.1.1.5  kleink 
    415  1.1.1.5  kleink Grotefend's data
    416  1.1.1.5  kleink 
    417  1.1.1.5  kleink From: "Michael Palmer" <mpalmer (a] netcom.com> [with one obvious typo fixed]
    418  1.1.1.5  kleink Subject: Re: Gregorian Calendar (was Re: Another FHC related question
    419  1.1.1.5  kleink Newsgroups: soc.genealogy.german
    420  1.1.1.5  kleink Date: Tue, 9 Feb 1999 02:32:48 -800
    421  1.1.1.5  kleink Message-ID: <199902091032.CAA09644 (a] netcom10.netcom.com>
    422  1.1.1.5  kleink 
    423  1.1.1.7  kleink The following is a(n incomplete) listing, arranged chronologically, of
    424  1.1.1.7  kleink European states, with the date they converted from the Julian to the
    425  1.1.1.5  kleink Gregorian calendar:
    426  1.1.1.5  kleink 
    427  1.1.1.5  kleink 04/15 Oct 1582 - Italy (with exceptions), Spain, Portugal, Poland (Roman
    428  1.1.1.5  kleink                  Catholics and Danzig only)
    429  1.1.1.5  kleink 09/20 Dec 1582 - France, Lorraine
    430  1.1.1.5  kleink 
    431  1.1.1.5  kleink 21 Dec 1582/
    432  1.1.1.5  kleink    01 Jan 1583 - Holland, Brabant, Flanders, Hennegau
    433  1.1.1.5  kleink 10/21 Feb 1583 - bishopric of Liege (L"uttich)
    434  1.1.1.5  kleink 13/24 Feb 1583 - bishopric of Augsburg
    435  1.1.1.5  kleink 04/15 Oct 1583 - electorate of Trier
    436  1.1.1.5  kleink 05/16 Oct 1583 - Bavaria, bishoprics of Freising, Eichstedt, Regensburg,
    437  1.1.1.5  kleink                  Salzburg, Brixen
    438  1.1.1.5  kleink 13/24 Oct 1583 - Austrian Oberelsass and Breisgau
    439  1.1.1.5  kleink 20/31 Oct 1583 - bishopric of Basel
    440  1.1.1.5  kleink 02/13 Nov 1583 - duchy of J"ulich-Berg
    441  1.1.1.5  kleink 02/13 Nov 1583 - electorate and city of K"oln
    442  1.1.1.5  kleink 04/15 Nov 1583 - bishopric of W"urzburg
    443  1.1.1.5  kleink 11/22 Nov 1583 - electorate of Mainz
    444  1.1.1.5  kleink 16/27 Nov 1583 - bishopric of Strassburg and the margraviate of Baden
    445  1.1.1.5  kleink 17/28 Nov 1583 - bishopric of M"unster and duchy of Cleve
    446  1.1.1.5  kleink 14/25 Dec 1583 - Steiermark
    447  1.1.1.5  kleink 
    448  1.1.1.5  kleink 06/17 Jan 1584 - Austria and Bohemia
    449  1.1.1.5  kleink 11/22 Jan 1584 - Luzern, Uri, Schwyz, Zug, Freiburg, Solothurn
    450  1.1.1.5  kleink 12/23 Jan 1584 - Silesia and the Lausitz
    451  1.1.1.5  kleink 22 Jan/
    452  1.1.1.5  kleink    02 Feb 1584 - Hungary (legally on 21 Oct 1587)
    453  1.1.1.5  kleink       Jun 1584 - Unterwalden
    454  1.1.1.5  kleink 01/12 Jul 1584 - duchy of Westfalen
    455  1.1.1.5  kleink 
    456  1.1.1.5  kleink 16/27 Jun 1585 - bishopric of Paderborn
    457  1.1.1.5  kleink 
    458  1.1.1.5  kleink 14/25 Dec 1590 - Transylvania
    459  1.1.1.5  kleink 
    460  1.1.1.5  kleink 22 Aug/
    461  1.1.1.5  kleink    02 Sep 1612 - duchy of Prussia
    462  1.1.1.5  kleink 
    463  1.1.1.5  kleink 13/24 Dec 1614 - Pfalz-Neuburg
    464  1.1.1.5  kleink 
    465  1.1.1.5  kleink           1617 - duchy of Kurland (reverted to the Julian calendar in
    466  1.1.1.5  kleink                  1796)
    467  1.1.1.5  kleink 
    468  1.1.1.5  kleink           1624 - bishopric of Osnabr"uck
    469  1.1.1.5  kleink 
    470  1.1.1.5  kleink           1630 - bishopric of Minden
    471  1.1.1.5  kleink 
    472  1.1.1.5  kleink 15/26 Mar 1631 - bishopric of Hildesheim
    473  1.1.1.5  kleink 
    474  1.1.1.5  kleink           1655 - Kanton Wallis
    475  1.1.1.5  kleink 
    476  1.1.1.5  kleink 05/16 Feb 1682 - city of Strassburg
    477  1.1.1.5  kleink 
    478  1.1.1.5  kleink 18 Feb/
    479  1.1.1.5  kleink    01 Mar 1700 - Protestant Germany (including Swedish possessions in
    480  1.1.1.5  kleink                  Germany), Denmark, Norway
    481  1.1.1.5  kleink 30 Jun/
    482  1.1.1.5  kleink    12 Jul 1700 - Gelderland, Zutphen
    483  1.1.1.5  kleink 10 Nov/
    484  1.1.1.5  kleink    12 Dec 1700 - Utrecht, Overijssel
    485  1.1.1.5  kleink 
    486  1.1.1.5  kleink 31 Dec 1700/
    487  1.1.1.5  kleink    12 Jan 1701 - Friesland, Groningen, Z"urich, Bern, Basel, Geneva,
    488  1.1.1.5  kleink                  Turgau, and Schaffhausen
    489  1.1.1.5  kleink 
    490  1.1.1.5  kleink           1724 - Glarus, Appenzell, and the city of St. Gallen
    491  1.1.1.5  kleink 
    492  1.1.1.5  kleink 01 Jan 1750    - Pisa and Florence
    493  1.1.1.5  kleink 
    494  1.1.1.5  kleink 02/14 Sep 1752 - Great Britain
    495  1.1.1.5  kleink 
    496  1.1.1.5  kleink 17 Feb/
    497  1.1.1.5  kleink    01 Mar 1753 - Sweden
    498  1.1.1.5  kleink 
    499  1.1.1.5  kleink 1760-1812      - Graub"unden
    500  1.1.1.5  kleink 
    501  1.1.1.7  kleink The Russian empire (including Finland and the Baltic states) did not
    502  1.1.1.5  kleink convert to the Gregorian calendar until the Soviet revolution of 1917.
    503  1.1.1.5  kleink 
    504  1.1.1.7  kleink Source:  H. Grotefend, _Taschenbuch der Zeitrechnung des deutschen
    505  1.1.1.7  kleink Mittelalters und der Neuzeit_, herausgegeben von Dr. O. Grotefend
    506  1.1.1.5  kleink (Hannover:  Hahnsche Buchhandlung, 1941), pp. 26-28.
    507