Import tzcode 2022c
This commit is contained in:
parent
9b5369d383
commit
a24d752d3e
97
CONTRIBUTING
Normal file
97
CONTRIBUTING
Normal file
@ -0,0 +1,97 @@
|
||||
# Contributing to the tz code and data
|
||||
|
||||
Please do not create issues or pull requests on GitHub, as the
|
||||
proper procedure for proposing and distributing patches is via
|
||||
email as described below.
|
||||
|
||||
The time zone database is by no means authoritative: governments
|
||||
change timekeeping rules erratically and sometimes with little
|
||||
warning, the data entries do not cover all of civil time before
|
||||
1970, and undoubtedly errors remain in the code and data. Feel
|
||||
free to fill gaps or fix mistakes, and please email improvements
|
||||
to <tz@iana.org> for use in the future. In your email, please give
|
||||
reliable sources that reviewers can check.
|
||||
|
||||
## Contributing technical changes
|
||||
|
||||
To email small changes, please run a POSIX shell command like
|
||||
'diff -u old/europe new/europe >myfix.patch', and attach
|
||||
'myfix.patch' to the email.
|
||||
|
||||
For more-elaborate or possibly-controversial changes,
|
||||
such as renaming, adding or removing zones, please read
|
||||
"Theory and pragmatics of the tz code and data"
|
||||
<https://www.iana.org/time-zones/repository/theory.html>.
|
||||
It is also good to browse the mailing list archives
|
||||
<https://mm.icann.org/pipermail/tz/> for examples of patches that tend
|
||||
to work well. Additions to data should contain commentary citing
|
||||
reliable sources as justification. Citations should use "https:" URLs
|
||||
if available.
|
||||
|
||||
For changes that fix sensitive security-related bugs, please see the
|
||||
distribution's 'SECURITY' file.
|
||||
|
||||
Please submit changes against either the latest release
|
||||
<https://www.iana.org/time-zones> or the main branch of the development
|
||||
repository. The latter is preferred.
|
||||
|
||||
## Sample Git workflow for developing contributions
|
||||
|
||||
If you use Git the following workflow may be helpful:
|
||||
|
||||
* Copy the development repository.
|
||||
|
||||
git clone https://github.com/eggert/tz.git
|
||||
cd tz
|
||||
|
||||
* Get current with the main branch.
|
||||
|
||||
git checkout main
|
||||
git pull
|
||||
|
||||
* Switch to a new branch for the changes. Choose a different
|
||||
branch name for each change set.
|
||||
|
||||
git checkout -b mybranch
|
||||
|
||||
* Sleuth by using 'git blame'. For example, when fixing data for
|
||||
Africa/Sao_Tome, if the command 'git blame africa' outputs a line
|
||||
'2951fa3b (Paul Eggert 2018-01-08 09:03:13 -0800 1068) Zone
|
||||
Africa/Sao_Tome 0:26:56 - LMT 1884', commit 2951fa3b should
|
||||
provide some justification for the 'Zone Africa/Sao_Tome' line.
|
||||
|
||||
* Edit source files. Include commentary that justifies the
|
||||
changes by citing reliable sources.
|
||||
|
||||
* Debug the changes, e.g.:
|
||||
|
||||
make check
|
||||
make install
|
||||
./zdump -v America/Los_Angeles
|
||||
|
||||
* For each separable change, commit it in the new branch, e.g.:
|
||||
|
||||
git add northamerica
|
||||
git commit
|
||||
|
||||
See recent 'git log' output for the commit-message style.
|
||||
|
||||
* Create patch files 0001-..., 0002-..., ...
|
||||
|
||||
git format-patch main
|
||||
|
||||
* After reviewing the patch files, send the patches to <tz@iana.org>
|
||||
for others to review.
|
||||
|
||||
git send-email main
|
||||
|
||||
For an archived example of such an email, see
|
||||
"[PROPOSED] Fix off-by-1 error for Jamaica and T&C before 1913"
|
||||
<https://mm.icann.org/pipermail/tz/2018-February/026122.html>.
|
||||
|
||||
* Start anew by getting current with the main branch again
|
||||
(the second step above).
|
||||
|
||||
-----
|
||||
|
||||
This file is in the public domain.
|
5
LICENSE
Normal file
5
LICENSE
Normal file
@ -0,0 +1,5 @@
|
||||
Unless specified below, all files in the tz code and data (including
|
||||
this LICENSE file) are in the public domain.
|
||||
|
||||
If the files date.c, newstrftime.3, and strftime.c are present, they
|
||||
contain material derived from BSD and use the BSD 3-clause license.
|
92
README
92
README
@ -1,86 +1,52 @@
|
||||
@(#)README 8.3
|
||||
This file is in the public domain, so clarified as of
|
||||
2009-05-17 by Arthur David Olson.
|
||||
README for the tz distribution
|
||||
|
||||
"What time is it?" -- Richard Deacon as The King
|
||||
"Any time you want it to be." -- Frank Baxter as The Scientist
|
||||
"Where do I set the hands of the clock?" -- Les Tremayne as The King
|
||||
"Oh that--you can set them any place you want." -- Frank Baxter as The Scientist
|
||||
(from the Bell System film "About Time")
|
||||
|
||||
The 1989 update of the time zone package featured
|
||||
The Time Zone Database (called tz, tzdb or zoneinfo) contains code and
|
||||
data that represent the history of local time for many representative
|
||||
locations around the globe. It is updated periodically to reflect
|
||||
changes made by political bodies to time zone boundaries, UTC offsets,
|
||||
and daylight-saving rules.
|
||||
|
||||
* POSIXization (including interpretation of POSIX-style TZ environment
|
||||
variables, provided by Guy Harris),
|
||||
* ANSIfication (including versions of "mktime" and "difftime"),
|
||||
* SVIDulation (an "altzone" variable)
|
||||
* MACHination (the "gtime" function)
|
||||
* corrections to some time zone data (including corrections to the rules
|
||||
for Great Britain and New Zealand)
|
||||
* reference data from the United States Naval Observatory for folks who
|
||||
want to do additional time zones
|
||||
* and the 1989 data for Saudi Arabia.
|
||||
|
||||
(Since this code will be treated as "part of the implementation" in some places
|
||||
and as "part of the application" in others, there's no good way to name
|
||||
functions, such as timegm, that are not part of the proposed ANSI C standard;
|
||||
such functions have kept their old, underscore-free names in this update.)
|
||||
|
||||
And the "dysize" function has disappeared; it was present to allow compilation
|
||||
of the "date" command on old BSD systems, and a version of "date" is now
|
||||
provided in the package. The "date" command is not created when you "make all"
|
||||
since it may lack options provided by the version distributed with your
|
||||
operating system, or may not interact with the system in the same way the
|
||||
native version does.
|
||||
|
||||
Since POSIX frowns on correct leap second handling, the default behavior of
|
||||
the "zic" command (in the absence of a "-L" option) has been changed to omit
|
||||
leap second information from its output files.
|
||||
|
||||
Here is a recipe for acquiring, building, installing, and testing the
|
||||
tz distribution on a GNU/Linux or similar host.
|
||||
|
||||
mkdir tz
|
||||
cd tz
|
||||
wget 'ftp://elsie.nci.nih.gov/pub/tz*.tar.gz'
|
||||
gzip -dc tzcode*.tar.gz | tar -xf -
|
||||
gzip -dc tzdata*.tar.gz | tar -xf -
|
||||
|
||||
Be sure to read the comments in "Makefile" and make any changes needed
|
||||
See <https://www.iana.org/time-zones/repository/tz-link.html> or the
|
||||
file tz-link.html for how to acquire the code and data. Once acquired,
|
||||
read the comments in the file 'Makefile' and make any changes needed
|
||||
to make things right for your system, especially if you are using some
|
||||
platform other than GNU/Linux. Then run the following commands,
|
||||
substituting your desired installation directory for "$HOME/tzdir":
|
||||
|
||||
make TOPDIR=$HOME/tzdir install
|
||||
$HOME/tzdir/etc/zdump -v America/Los_Angeles
|
||||
$HOME/tzdir/usr/bin/zdump -v America/Los_Angeles
|
||||
|
||||
To use the new functions, use a "-ltz" option when compiling or linking.
|
||||
See the file tz-how-to.html for examples of how to read the data files.
|
||||
|
||||
Historical local time information has been included here to:
|
||||
This database of historical local time information has several goals:
|
||||
|
||||
* provide a compendium of data about the history of civil time
|
||||
that is useful even if the data are not 100% accurate;
|
||||
* Provide a compendium of data about the history of civil time that
|
||||
is useful even if not 100% accurate.
|
||||
|
||||
* give an idea of the variety of local time rules that have
|
||||
existed in the past and thus an idea of the variety that may be
|
||||
expected in the future;
|
||||
* Give an idea of the variety of local time rules that have existed
|
||||
in the past and thus may be expected in the future.
|
||||
|
||||
* provide a test of the generality of the local time rule description
|
||||
system.
|
||||
* Test the generality of the local time rule description system.
|
||||
|
||||
The information in the time zone data files is by no means authoritative;
|
||||
the files currently do not even attempt to cover all time stamps before
|
||||
1970, and there are undoubtedly errors even for time stamps since 1970.
|
||||
If you know that the rules are different from those in a file, by all means
|
||||
feel free to change file (and please send the changed version to
|
||||
tz@elsie.nci.nih.gov for use in the future). Europeans take note!
|
||||
fixes and enhancements are welcome. Please see the file CONTRIBUTING
|
||||
for details.
|
||||
|
||||
Thanks to these Timezone Caballeros who've made major contributions to the
|
||||
time conversion package: Keith Bostic; Bob Devine; Paul Eggert; Robert Elz;
|
||||
Thanks to these Time Zone Caballeros who've made major contributions to the
|
||||
time conversion package: Keith Bostic; Bob Devine; Paul Eggert; Robert Elz;
|
||||
Guy Harris; Mark Horton; John Mackin; and Bradley White. Thanks also to
|
||||
Michael Bloom, Art Neilson, Stephen Prince, John Sovereign, and Frank Wales
|
||||
for testing work, and to Gwillim Law for checking local mean time data.
|
||||
Thanks in particular to Arthur David Olson, the project's founder and first
|
||||
maintainer, to whom the time zone community owes the greatest debt of all.
|
||||
None of them are responsible for remaining errors.
|
||||
|
||||
Look in the ~ftp/pub directory of elsie.nci.nih.gov
|
||||
for updated versions of these files.
|
||||
-----
|
||||
|
||||
Please send comments or information to tz@elsie.nci.nih.gov.
|
||||
This file is in the public domain, so clarified as of 2009-05-17 by
|
||||
Arthur David Olson. The other files in this distribution are either
|
||||
public domain or BSD licensed; see the file LICENSE for details.
|
||||
|
15
SECURITY
Normal file
15
SECURITY
Normal file
@ -0,0 +1,15 @@
|
||||
Please report any sensitive security-related bugs via email to the
|
||||
tzdb designated coordinators, currently Paul Eggert
|
||||
<eggert@cs.ucla.edu> and Tim Parenti <tim@timtimeonline.com>.
|
||||
Put "tzdb security" at the start of your email's subject line.
|
||||
We prefer communications to be in English.
|
||||
|
||||
You should receive a response within a week. If not, please follow up
|
||||
via email to make sure we received your original message.
|
||||
|
||||
If we confirm the bug, we plan to notify affected third-party services
|
||||
or software that we know about, prepare an advisory, commit fixes to
|
||||
the main development branch as quickly as is practical, and finally
|
||||
publish the advisory on tz@iana.org. As with all tzdb contributions,
|
||||
we give credit to security contributors unless they wish to remain
|
||||
anonymous.
|
568
Theory
568
Theory
@ -1,568 +0,0 @@
|
||||
@(#)Theory 8.5
|
||||
This file is in the public domain, so clarified as of
|
||||
2009-05-17 by Arthur David Olson.
|
||||
|
||||
----- Outline -----
|
||||
|
||||
Time and date functions
|
||||
Names of time zone regions
|
||||
Time zone abbreviations
|
||||
Calendrical issues
|
||||
Time and time zones on Mars
|
||||
|
||||
----- Time and date functions -----
|
||||
|
||||
These time and date functions are upwards compatible with POSIX,
|
||||
an international standard for UNIX-like systems.
|
||||
As of this writing, the current edition of POSIX is:
|
||||
|
||||
Standard for Information technology
|
||||
-- Portable Operating System Interface (POSIX (R))
|
||||
-- System Interfaces
|
||||
IEEE Std 1003.1, 2004 Edition
|
||||
<http://www.opengroup.org/online-pubs?DOC=7999959899>
|
||||
<http://www.opengroup.org/pubs/catalog/t041.htm>
|
||||
|
||||
POSIX has the following properties and limitations.
|
||||
|
||||
* In POSIX, time display in a process is controlled by the
|
||||
environment variable TZ. Unfortunately, the POSIX TZ string takes
|
||||
a form that is hard to describe and is error-prone in practice.
|
||||
Also, POSIX TZ strings can't deal with other (for example, Israeli)
|
||||
daylight saving time rules, or situations where more than two
|
||||
time zone abbreviations are used in an area.
|
||||
|
||||
The POSIX TZ string takes the following form:
|
||||
|
||||
stdoffset[dst[offset],date[/time],date[/time]]
|
||||
|
||||
where:
|
||||
|
||||
std and dst
|
||||
are 3 or more characters specifying the standard
|
||||
and daylight saving time (DST) zone names.
|
||||
Starting with POSIX.1-2001, std and dst may also be
|
||||
in a quoted form like "<UTC+10>"; this allows
|
||||
"+" and "-" in the names.
|
||||
offset
|
||||
is of the form `[-]hh:[mm[:ss]]' and specifies the
|
||||
offset west of UTC. The default DST offset is one hour
|
||||
ahead of standard time.
|
||||
date[/time],date[/time]
|
||||
specifies the beginning and end of DST. If this is absent,
|
||||
the system supplies its own rules for DST, and these can
|
||||
differ from year to year; typically US DST rules are used.
|
||||
time
|
||||
takes the form `hh:[mm[:ss]]' and defaults to 02:00.
|
||||
date
|
||||
takes one of the following forms:
|
||||
Jn (1<=n<=365)
|
||||
origin-1 day number not counting February 29
|
||||
n (0<=n<=365)
|
||||
origin-0 day number counting February 29 if present
|
||||
Mm.n.d (0[Sunday]<=d<=6[Saturday], 1<=n<=5, 1<=m<=12)
|
||||
for the dth day of week n of month m of the year,
|
||||
where week 1 is the first week in which day d appears,
|
||||
and `5' stands for the last week in which day d appears
|
||||
(which may be either the 4th or 5th week).
|
||||
|
||||
Here is an example POSIX TZ string, for US Pacific time using rules
|
||||
appropriate from 1987 through 2006:
|
||||
|
||||
TZ='PST8PDT,M4.1.0/02:00,M10.5.0/02:00'
|
||||
|
||||
This POSIX TZ string is hard to remember, and mishandles time stamps
|
||||
before 1987 and after 2006. With this package you can use this
|
||||
instead:
|
||||
|
||||
TZ='America/Los_Angeles'
|
||||
|
||||
* POSIX does not define the exact meaning of TZ values like "EST5EDT".
|
||||
Typically the current US DST rules are used to interpret such values,
|
||||
but this means that the US DST rules are compiled into each program
|
||||
that does time conversion. This means that when US time conversion
|
||||
rules change (as in the United States in 1987), all programs that
|
||||
do time conversion must be recompiled to ensure proper results.
|
||||
|
||||
* In POSIX, there's no tamper-proof way for a process to learn the
|
||||
system's best idea of local wall clock. (This is important for
|
||||
applications that an administrator wants used only at certain times--
|
||||
without regard to whether the user has fiddled the "TZ" environment
|
||||
variable. While an administrator can "do everything in UTC" to get
|
||||
around the problem, doing so is inconvenient and precludes handling
|
||||
daylight saving time shifts--as might be required to limit phone
|
||||
calls to off-peak hours.)
|
||||
|
||||
* POSIX requires that systems ignore leap seconds.
|
||||
|
||||
These are the extensions that have been made to the POSIX functions:
|
||||
|
||||
* The "TZ" environment variable is used in generating the name of a file
|
||||
from which time zone information is read (or is interpreted a la
|
||||
POSIX); "TZ" is no longer constrained to be a three-letter time zone
|
||||
name followed by a number of hours and an optional three-letter
|
||||
daylight time zone name. The daylight saving time rules to be used
|
||||
for a particular time zone are encoded in the time zone file;
|
||||
the format of the file allows U.S., Australian, and other rules to be
|
||||
encoded, and allows for situations where more than two time zone
|
||||
abbreviations are used.
|
||||
|
||||
It was recognized that allowing the "TZ" environment variable to
|
||||
take on values such as "America/New_York" might cause "old" programs
|
||||
(that expect "TZ" to have a certain form) to operate incorrectly;
|
||||
consideration was given to using some other environment variable
|
||||
(for example, "TIMEZONE") to hold the string used to generate the
|
||||
time zone information file name. In the end, however, it was decided
|
||||
to continue using "TZ": it is widely used for time zone purposes;
|
||||
separately maintaining both "TZ" and "TIMEZONE" seemed a nuisance;
|
||||
and systems where "new" forms of "TZ" might cause problems can simply
|
||||
use TZ values such as "EST5EDT" which can be used both by
|
||||
"new" programs (a la POSIX) and "old" programs (as zone names and
|
||||
offsets).
|
||||
|
||||
* To handle places where more than two time zone abbreviations are used,
|
||||
the functions "localtime" and "gmtime" set tzname[tmp->tm_isdst]
|
||||
(where "tmp" is the value the function returns) to the time zone
|
||||
abbreviation to be used. This differs from POSIX, where the elements
|
||||
of tzname are only changed as a result of calls to tzset.
|
||||
|
||||
* Since the "TZ" environment variable can now be used to control time
|
||||
conversion, the "daylight" and "timezone" variables are no longer
|
||||
needed. (These variables are defined and set by "tzset"; however, their
|
||||
values will not be used by "localtime.")
|
||||
|
||||
* The "localtime" function has been set up to deliver correct results
|
||||
for near-minimum or near-maximum time_t values. (A comment in the
|
||||
source code tells how to get compatibly wrong results).
|
||||
|
||||
* A function "tzsetwall" has been added to arrange for the system's
|
||||
best approximation to local wall clock time to be delivered by
|
||||
subsequent calls to "localtime." Source code for portable
|
||||
applications that "must" run on local wall clock time should call
|
||||
"tzsetwall();" if such code is moved to "old" systems that don't
|
||||
provide tzsetwall, you won't be able to generate an executable program.
|
||||
(These time zone functions also arrange for local wall clock time to be
|
||||
used if tzset is called--directly or indirectly--and there's no "TZ"
|
||||
environment variable; portable applications should not, however, rely
|
||||
on this behavior since it's not the way SVR2 systems behave.)
|
||||
|
||||
* These functions can account for leap seconds, thanks to Bradley White.
|
||||
|
||||
Points of interest to folks with other systems:
|
||||
|
||||
* This package is already part of many POSIX-compliant hosts,
|
||||
including BSD, HP, Linux, Network Appliance, SCO, SGI, and Sun.
|
||||
On such hosts, the primary use of this package
|
||||
is to update obsolete time zone rule tables.
|
||||
To do this, you may need to compile the time zone compiler
|
||||
`zic' supplied with this package instead of using the system `zic',
|
||||
since the format of zic's input changed slightly in late 1994,
|
||||
and many vendors still do not support the new input format.
|
||||
|
||||
* The UNIX Version 7 "timezone" function is not present in this package;
|
||||
it's impossible to reliably map timezone's arguments (a "minutes west
|
||||
of GMT" value and a "daylight saving time in effect" flag) to a
|
||||
time zone abbreviation, and we refuse to guess.
|
||||
Programs that in the past used the timezone function may now examine
|
||||
tzname[localtime(&clock)->tm_isdst] to learn the correct time
|
||||
zone abbreviation to use. Alternatively, use
|
||||
localtime(&clock)->tm_zone if this has been enabled.
|
||||
|
||||
* The 4.2BSD gettimeofday function is not used in this package.
|
||||
This formerly let users obtain the current UTC offset and DST flag,
|
||||
but this functionality was removed in later versions of BSD.
|
||||
|
||||
* In SVR2, time conversion fails for near-minimum or near-maximum
|
||||
time_t values when doing conversions for places that don't use UTC.
|
||||
This package takes care to do these conversions correctly.
|
||||
|
||||
The functions that are conditionally compiled if STD_INSPIRED is defined
|
||||
should, at this point, be looked on primarily as food for thought. They are
|
||||
not in any sense "standard compatible"--some are not, in fact, specified in
|
||||
*any* standard. They do, however, represent responses of various authors to
|
||||
standardization proposals.
|
||||
|
||||
Other time conversion proposals, in particular the one developed by folks at
|
||||
Hewlett Packard, offer a wider selection of functions that provide capabilities
|
||||
beyond those provided here. The absence of such functions from this package
|
||||
is not meant to discourage the development, standardization, or use of such
|
||||
functions. Rather, their absence reflects the decision to make this package
|
||||
contain valid extensions to POSIX, to ensure its broad acceptability. If
|
||||
more powerful time conversion functions can be standardized, so much the
|
||||
better.
|
||||
|
||||
|
||||
----- Names of time zone rule files -----
|
||||
|
||||
The time zone rule file naming conventions attempt to strike a balance
|
||||
among the following goals:
|
||||
|
||||
* Uniquely identify every national region where clocks have all
|
||||
agreed since 1970. This is essential for the intended use: static
|
||||
clocks keeping local civil time.
|
||||
|
||||
* Indicate to humans as to where that region is. This simplifes use.
|
||||
|
||||
* Be robust in the presence of political changes. This reduces the
|
||||
number of updates and backward-compatibility hacks. For example,
|
||||
names of countries are ordinarily not used, to avoid
|
||||
incompatibilities when countries change their name
|
||||
(e.g. Zaire->Congo) or when locations change countries
|
||||
(e.g. Hong Kong from UK colony to China).
|
||||
|
||||
* Be portable to a wide variety of implementations.
|
||||
This promotes use of the technology.
|
||||
|
||||
* Use a consistent naming convention over the entire world.
|
||||
This simplifies both use and maintenance.
|
||||
|
||||
This naming convention is not intended for use by inexperienced users
|
||||
to select TZ values by themselves (though they can of course examine
|
||||
and reuse existing settings). Distributors should provide
|
||||
documentation and/or a simple selection interface that explains the
|
||||
names; see the 'tzselect' program supplied with this distribution for
|
||||
one example.
|
||||
|
||||
Names normally have the form AREA/LOCATION, where AREA is the name
|
||||
of a continent or ocean, and LOCATION is the name of a specific
|
||||
location within that region. North and South America share the same
|
||||
area, `America'. Typical names are `Africa/Cairo', `America/New_York',
|
||||
and `Pacific/Honolulu'.
|
||||
|
||||
Here are the general rules used for choosing location names,
|
||||
in decreasing order of importance:
|
||||
|
||||
Use only valid POSIX file name components (i.e., the parts of
|
||||
names other than `/'). Within a file name component,
|
||||
use only ASCII letters, `.', `-' and `_'. Do not use
|
||||
digits, as that might create an ambiguity with POSIX
|
||||
TZ strings. A file name component must not exceed 14
|
||||
characters or start with `-'. E.g., prefer `Brunei'
|
||||
to `Bandar_Seri_Begawan'.
|
||||
Include at least one location per time zone rule set per country.
|
||||
One such location is enough. Use ISO 3166 (see the file
|
||||
iso3166.tab) to help decide whether something is a country.
|
||||
However, uninhabited ISO 3166 regions like Bouvet Island
|
||||
do not need locations, since local time is not defined there.
|
||||
If all the clocks in a country's region have agreed since 1970,
|
||||
don't bother to include more than one location
|
||||
even if subregions' clocks disagreed before 1970.
|
||||
Otherwise these tables would become annoyingly large.
|
||||
If a name is ambiguous, use a less ambiguous alternative;
|
||||
e.g. many cities are named San Jose and Georgetown, so
|
||||
prefer `Costa_Rica' to `San_Jose' and `Guyana' to `Georgetown'.
|
||||
Keep locations compact. Use cities or small islands, not countries
|
||||
or regions, so that any future time zone changes do not split
|
||||
locations into different time zones. E.g. prefer `Paris'
|
||||
to `France', since France has had multiple time zones.
|
||||
Use mainstream English spelling, e.g. prefer `Rome' to `Roma', and
|
||||
prefer `Athens' to the true name (which uses Greek letters).
|
||||
The POSIX file name restrictions encourage this rule.
|
||||
Use the most populous among locations in a country's time zone,
|
||||
e.g. prefer `Shanghai' to `Beijing'. Among locations with
|
||||
similar populations, pick the best-known location,
|
||||
e.g. prefer `Rome' to `Milan'.
|
||||
Use the singular form, e.g. prefer `Canary' to `Canaries'.
|
||||
Omit common suffixes like `_Islands' and `_City', unless that
|
||||
would lead to ambiguity. E.g. prefer `Cayman' to
|
||||
`Cayman_Islands' and `Guatemala' to `Guatemala_City',
|
||||
but prefer `Mexico_City' to `Mexico' because the country
|
||||
of Mexico has several time zones.
|
||||
Use `_' to represent a space.
|
||||
Omit `.' from abbreviations in names, e.g. prefer `St_Helena'
|
||||
to `St._Helena'.
|
||||
Do not change established names if they only marginally
|
||||
violate the above rules. For example, don't change
|
||||
the existing name `Rome' to `Milan' merely because
|
||||
Milan's population has grown to be somewhat greater
|
||||
than Rome's.
|
||||
If a name is changed, put its old spelling in the `backward' file.
|
||||
|
||||
The file `zone.tab' lists the geographical locations used to name
|
||||
time zone rule files. It is intended to be an exhaustive list
|
||||
of canonical names for geographic regions.
|
||||
|
||||
Older versions of this package used a different naming scheme,
|
||||
and these older names are still supported.
|
||||
See the file `backward' for most of these older names
|
||||
(e.g. `US/Eastern' instead of `America/New_York').
|
||||
The other old-fashioned names still supported are
|
||||
`WET', `CET', `MET', and `EET' (see the file `europe').
|
||||
|
||||
|
||||
----- Time zone abbreviations -----
|
||||
|
||||
When this package is installed, it generates time zone abbreviations
|
||||
like `EST' to be compatible with human tradition and POSIX.
|
||||
Here are the general rules used for choosing time zone abbreviations,
|
||||
in decreasing order of importance:
|
||||
|
||||
Use abbreviations that consist of three or more ASCII letters.
|
||||
Previous editions of this database also used characters like
|
||||
' ' and '?', but these characters have a special meaning to
|
||||
the shell and cause commands like
|
||||
set `date`
|
||||
to have unexpected effects.
|
||||
Previous editions of this rule required upper-case letters,
|
||||
but the Congressman who introduced Chamorro Standard Time
|
||||
preferred "ChST", so the rule has been relaxed.
|
||||
|
||||
This rule guarantees that all abbreviations could have
|
||||
been specified by a POSIX TZ string. POSIX
|
||||
requires at least three characters for an
|
||||
abbreviation. POSIX through 2000 says that an abbreviation
|
||||
cannot start with ':', and cannot contain ',', '-',
|
||||
'+', NUL, or a digit. POSIX from 2001 on changes this
|
||||
rule to say that an abbreviation can contain only '-', '+',
|
||||
and alphanumeric characters from the portable character set
|
||||
in the current locale. To be portable to both sets of
|
||||
rules, an abbreviation must therefore use only ASCII
|
||||
letters.
|
||||
|
||||
Use abbreviations that are in common use among English-speakers,
|
||||
e.g. `EST' for Eastern Standard Time in North America.
|
||||
We assume that applications translate them to other languages
|
||||
as part of the normal localization process; for example,
|
||||
a French application might translate `EST' to `HNE'.
|
||||
|
||||
For zones whose times are taken from a city's longitude, use the
|
||||
traditional xMT notation, e.g. `PMT' for Paris Mean Time.
|
||||
The only name like this in current use is `GMT'.
|
||||
|
||||
If there is no common English abbreviation, abbreviate the English
|
||||
translation of the usual phrase used by native speakers.
|
||||
If this is not available or is a phrase mentioning the country
|
||||
(e.g. ``Cape Verde Time''), then:
|
||||
|
||||
When a country has a single or principal time zone region,
|
||||
append `T' to the country's ISO code, e.g. `CVT' for
|
||||
Cape Verde Time. For summer time append `ST';
|
||||
for double summer time append `DST'; etc.
|
||||
When a country has multiple time zones, take the first three
|
||||
letters of an English place name identifying each zone
|
||||
and then append `T', `ST', etc. as before;
|
||||
e.g. `VLAST' for VLAdivostok Summer Time.
|
||||
|
||||
Use UTC (with time zone abbreviation "zzz") for locations while
|
||||
uninhabited. The "zzz" mnemonic is that these locations are,
|
||||
in some sense, asleep.
|
||||
|
||||
Application writers should note that these abbreviations are ambiguous
|
||||
in practice: e.g. `EST' has a different meaning in Australia than
|
||||
it does in the United States. In new applications, it's often better
|
||||
to use numeric UTC offsets like `-0500' instead of time zone
|
||||
abbreviations like `EST'; this avoids the ambiguity.
|
||||
|
||||
|
||||
----- Calendrical issues -----
|
||||
|
||||
Calendrical issues are a bit out of scope for a time zone database,
|
||||
but they indicate the sort of problems that we would run into if we
|
||||
extended the time zone database further into the past. An excellent
|
||||
resource in this area is Nachum Dershowitz and Edward M. Reingold,
|
||||
<a href="http://emr.cs.iit.edu/home/reingold/calendar-book/third-edition/">
|
||||
Calendrical Calculations: Third Edition
|
||||
</a>, Cambridge University Press (2008). Other information and
|
||||
sources are given below. They sometimes disagree.
|
||||
|
||||
|
||||
France
|
||||
|
||||
Gregorian calendar adopted 1582-12-20.
|
||||
French Revolutionary calendar used 1793-11-24 through 1805-12-31,
|
||||
and (in Paris only) 1871-05-06 through 1871-05-23.
|
||||
|
||||
|
||||
Russia
|
||||
|
||||
From Chris Carrier (1996-12-02):
|
||||
On 1929-10-01 the Soviet Union instituted an ``Eternal Calendar''
|
||||
with 30-day months plus 5 holidays, with a 5-day week.
|
||||
On 1931-12-01 it changed to a 6-day week; in 1934 it reverted to the
|
||||
Gregorian calendar while retaining the 6-day week; on 1940-06-27 it
|
||||
reverted to the 7-day week. With the 6-day week the usual days
|
||||
off were the 6th, 12th, 18th, 24th and 30th of the month.
|
||||
(Source: Evitiar Zerubavel, _The Seven Day Circle_)
|
||||
|
||||
|
||||
Mark Brader reported a similar story in "The Book of Calendars", edited
|
||||
by Frank Parise (1982, Facts on File, ISBN 0-8719-6467-8), page 377. But:
|
||||
|
||||
From: Petteri Sulonen (via Usenet)
|
||||
Date: 14 Jan 1999 00:00:00 GMT
|
||||
...
|
||||
|
||||
If your source is correct, how come documents between 1929 -- 1940 were
|
||||
still dated using the conventional, Gregorian calendar?
|
||||
|
||||
I can post a scan of a document dated December 1, 1934, signed by
|
||||
Yenukidze, the secretary, on behalf of Kalinin, the President of the
|
||||
Executive Committee of the Supreme Soviet, if you like.
|
||||
|
||||
|
||||
|
||||
Sweden (and Finland)
|
||||
|
||||
From: Mark Brader
|
||||
<a href="news:1996Jul6.012937.29190@sq.com">
|
||||
Subject: Re: Gregorian reform -- a part of locale?
|
||||
</a>
|
||||
Date: 1996-07-06
|
||||
|
||||
In 1700, Denmark made the transition from Julian to Gregorian. Sweden
|
||||
decided to *start* a transition in 1700 as well, but rather than have one of
|
||||
those unsightly calendar gaps :-), they simply decreed that the next leap
|
||||
year after 1696 would be in 1744 -- putting the whole country on a calendar
|
||||
different from both Julian and Gregorian for a period of 40 years.
|
||||
|
||||
However, in 1704 something went wrong and the plan was not carried through;
|
||||
they did, after all, have a leap year that year. And one in 1708. In 1712
|
||||
they gave it up and went back to Julian, putting 30 days in February that
|
||||
year!...
|
||||
|
||||
Then in 1753, Sweden made the transition to Gregorian in the usual manner,
|
||||
getting there only 13 years behind the original schedule.
|
||||
|
||||
(A previous posting of this story was challenged, and Swedish readers
|
||||
produced the following references to support it: "Tiderakning och historia"
|
||||
by Natanael Beckman (1924) and "Tid, en bok om tiderakning och
|
||||
kalendervasen" by Lars-Olof Lode'n (no date was given).)
|
||||
|
||||
|
||||
Grotefend's data
|
||||
|
||||
From: "Michael Palmer" [with one obvious typo fixed]
|
||||
Subject: Re: Gregorian Calendar (was Re: Another FHC related question
|
||||
Newsgroups: soc.genealogy.german
|
||||
Date: Tue, 9 Feb 1999 02:32:48 -800
|
||||
...
|
||||
|
||||
The following is a(n incomplete) listing, arranged chronologically, of
|
||||
European states, with the date they converted from the Julian to the
|
||||
Gregorian calendar:
|
||||
|
||||
04/15 Oct 1582 - Italy (with exceptions), Spain, Portugal, Poland (Roman
|
||||
Catholics and Danzig only)
|
||||
09/20 Dec 1582 - France, Lorraine
|
||||
|
||||
21 Dec 1582/
|
||||
01 Jan 1583 - Holland, Brabant, Flanders, Hennegau
|
||||
10/21 Feb 1583 - bishopric of Liege (L"uttich)
|
||||
13/24 Feb 1583 - bishopric of Augsburg
|
||||
04/15 Oct 1583 - electorate of Trier
|
||||
05/16 Oct 1583 - Bavaria, bishoprics of Freising, Eichstedt, Regensburg,
|
||||
Salzburg, Brixen
|
||||
13/24 Oct 1583 - Austrian Oberelsass and Breisgau
|
||||
20/31 Oct 1583 - bishopric of Basel
|
||||
02/13 Nov 1583 - duchy of J"ulich-Berg
|
||||
02/13 Nov 1583 - electorate and city of K"oln
|
||||
04/15 Nov 1583 - bishopric of W"urzburg
|
||||
11/22 Nov 1583 - electorate of Mainz
|
||||
16/27 Nov 1583 - bishopric of Strassburg and the margraviate of Baden
|
||||
17/28 Nov 1583 - bishopric of M"unster and duchy of Cleve
|
||||
14/25 Dec 1583 - Steiermark
|
||||
|
||||
06/17 Jan 1584 - Austria and Bohemia
|
||||
11/22 Jan 1584 - Luzern, Uri, Schwyz, Zug, Freiburg, Solothurn
|
||||
12/23 Jan 1584 - Silesia and the Lausitz
|
||||
22 Jan/
|
||||
02 Feb 1584 - Hungary (legally on 21 Oct 1587)
|
||||
Jun 1584 - Unterwalden
|
||||
01/12 Jul 1584 - duchy of Westfalen
|
||||
|
||||
16/27 Jun 1585 - bishopric of Paderborn
|
||||
|
||||
14/25 Dec 1590 - Transylvania
|
||||
|
||||
22 Aug/
|
||||
02 Sep 1612 - duchy of Prussia
|
||||
|
||||
13/24 Dec 1614 - Pfalz-Neuburg
|
||||
|
||||
1617 - duchy of Kurland (reverted to the Julian calendar in
|
||||
1796)
|
||||
|
||||
1624 - bishopric of Osnabr"uck
|
||||
|
||||
1630 - bishopric of Minden
|
||||
|
||||
15/26 Mar 1631 - bishopric of Hildesheim
|
||||
|
||||
1655 - Kanton Wallis
|
||||
|
||||
05/16 Feb 1682 - city of Strassburg
|
||||
|
||||
18 Feb/
|
||||
01 Mar 1700 - Protestant Germany (including Swedish possessions in
|
||||
Germany), Denmark, Norway
|
||||
30 Jun/
|
||||
12 Jul 1700 - Gelderland, Zutphen
|
||||
10 Nov/
|
||||
12 Dec 1700 - Utrecht, Overijssel
|
||||
|
||||
31 Dec 1700/
|
||||
12 Jan 1701 - Friesland, Groningen, Z"urich, Bern, Basel, Geneva,
|
||||
Turgau, and Schaffhausen
|
||||
|
||||
1724 - Glarus, Appenzell, and the city of St. Gallen
|
||||
|
||||
01 Jan 1750 - Pisa and Florence
|
||||
|
||||
02/14 Sep 1752 - Great Britain
|
||||
|
||||
17 Feb/
|
||||
01 Mar 1753 - Sweden
|
||||
|
||||
1760-1812 - Graub"unden
|
||||
|
||||
The Russian empire (including Finland and the Baltic states) did not
|
||||
convert to the Gregorian calendar until the Soviet revolution of 1917.
|
||||
|
||||
Source: H. Grotefend, _Taschenbuch der Zeitrechnung des deutschen
|
||||
Mittelalters und der Neuzeit_, herausgegeben von Dr. O. Grotefend
|
||||
(Hannover: Hahnsche Buchhandlung, 1941), pp. 26-28.
|
||||
|
||||
|
||||
----- Time and time zones on Mars -----
|
||||
|
||||
Some people have adjusted their work schedules to fit Mars time.
|
||||
Dozens of special Mars watches were built for Jet Propulsion
|
||||
Laboratory workers who kept Mars time during the Mars Exploration
|
||||
Rovers mission (2004). These timepieces look like normal Seikos and
|
||||
Citizens but use Mars seconds rather than terrestrial seconds.
|
||||
|
||||
A Mars solar day is called a "sol" and has a mean period equal to
|
||||
about 24 hours 39 minutes 35.244 seconds in terrestrial time. It is
|
||||
divided into a conventional 24-hour clock, so each Mars second equals
|
||||
about 1.02749125 terrestrial seconds.
|
||||
|
||||
The prime meridian of Mars goes through the center of the crater
|
||||
Airy-0, named in honor of the British astronomer who built the
|
||||
Greenwich telescope that defines Earth's prime meridian. Mean solar
|
||||
time on the Mars prime meridian is called Mars Coordinated Time (MTC).
|
||||
|
||||
Each landed mission on Mars has adopted a different reference for
|
||||
solar time keeping, so there is no real standard for Mars time zones.
|
||||
For example, the Mars Exploration Rover project (2004) defined two
|
||||
time zones "Local Solar Time A" and "Local Solar Time B" for its two
|
||||
missions, each zone designed so that its time equals local true solar
|
||||
time at approximately the middle of the nominal mission. Such a "time
|
||||
zone" is not particularly suited for any application other than the
|
||||
mission itself.
|
||||
|
||||
Many calendars have been proposed for Mars, but none have achieved
|
||||
wide acceptance. Astronomers often use Mars Sol Date (MSD) which is a
|
||||
sequential count of Mars solar days elapsed since about 1873-12-29
|
||||
12:00 GMT.
|
||||
|
||||
The tz database does not currently support Mars time, but it is
|
||||
documented here in the hopes that support will be added eventually.
|
||||
|
||||
Sources:
|
||||
|
||||
Michael Allison and Robert Schmunk,
|
||||
"Technical Notes on Mars Solar Time as Adopted by the Mars24 Sunclock"
|
||||
<http://www.giss.nasa.gov/tools/mars24/help/notes.html> (2004-07-30).
|
||||
|
||||
Jia-Rui Chong, "Workdays Fit for a Martian", Los Angeles Times
|
||||
(2004-01-14), pp A1, A20-A21.
|
69
asctime.c
69
asctime.c
@ -1,3 +1,5 @@
|
||||
/* asctime and asctime_r a la POSIX and ISO C, except pad years before 1000. */
|
||||
|
||||
/*
|
||||
** This file is in the public domain, so clarified as of
|
||||
** 1996-06-05 by Arthur David Olson.
|
||||
@ -9,23 +11,11 @@
|
||||
** whereas the output of asctime is supposed to be constant.
|
||||
*/
|
||||
|
||||
#ifndef lint
|
||||
#ifndef NOID
|
||||
static char elsieid[] = "@(#)asctime.c 8.5";
|
||||
#endif /* !defined NOID */
|
||||
#endif /* !defined lint */
|
||||
|
||||
/*LINTLIBRARY*/
|
||||
|
||||
#include "private.h"
|
||||
#include "tzfile.h"
|
||||
#include <stdio.h>
|
||||
|
||||
/*
|
||||
** Some systems only handle "%.2d"; others only handle "%02d";
|
||||
** "%02.2d" makes (most) everybody happy.
|
||||
** At least some versions of gcc warn about the %02.2d;
|
||||
** we conditionalize below to avoid the warning.
|
||||
*/
|
||||
/*
|
||||
** All years associated with 32-bit time_t values are exactly four digits long;
|
||||
** some years associated with 64-bit time_t values are not.
|
||||
@ -35,61 +25,45 @@ static char elsieid[] = "@(#)asctime.c 8.5";
|
||||
** leading zeroes to get the newline in the traditional place.
|
||||
** The -4 ensures that we get four characters of output even if
|
||||
** we call a strftime variant that produces fewer characters for some years.
|
||||
** The ISO C 1999 and POSIX 1003.1-2004 standards prohibit padding the year,
|
||||
** The ISO C and POSIX standards prohibit padding the year,
|
||||
** but many implementations pad anyway; most likely the standards are buggy.
|
||||
*/
|
||||
#ifdef __GNUC__
|
||||
#define ASCTIME_FMT "%.3s %.3s%3d %2.2d:%2.2d:%2.2d %-4s\n"
|
||||
#else /* !defined __GNUC__ */
|
||||
#define ASCTIME_FMT "%.3s %.3s%3d %02.2d:%02.2d:%02.2d %-4s\n"
|
||||
#endif /* !defined __GNUC__ */
|
||||
static char const ASCTIME_FMT[] = "%s %s%3d %.2d:%.2d:%.2d %-4s\n";
|
||||
/*
|
||||
** For years that are more than four digits we put extra spaces before the year
|
||||
** so that code trying to overwrite the newline won't end up overwriting
|
||||
** a digit within a year and truncating the year (operating on the assumption
|
||||
** that no output is better than wrong output).
|
||||
*/
|
||||
#ifdef __GNUC__
|
||||
#define ASCTIME_FMT_B "%.3s %.3s%3d %2.2d:%2.2d:%2.2d %s\n"
|
||||
#else /* !defined __GNUC__ */
|
||||
#define ASCTIME_FMT_B "%.3s %.3s%3d %02.2d:%02.2d:%02.2d %s\n"
|
||||
#endif /* !defined __GNUC__ */
|
||||
static char const ASCTIME_FMT_B[] = "%s %s%3d %.2d:%.2d:%.2d %s\n";
|
||||
|
||||
#define STD_ASCTIME_BUF_SIZE 26
|
||||
enum { STD_ASCTIME_BUF_SIZE = 26 };
|
||||
/*
|
||||
** Big enough for something such as
|
||||
** ??? ???-2147483648 -2147483648:-2147483648:-2147483648 -2147483648\n
|
||||
** (two three-character abbreviations, five strings denoting integers,
|
||||
** seven explicit spaces, two explicit colons, a newline,
|
||||
** and a trailing ASCII nul).
|
||||
** and a trailing NUL byte).
|
||||
** The values above are for systems where an int is 32 bits and are provided
|
||||
** as an example; the define below calculates the maximum for the system at
|
||||
** as an example; the size expression below is a bound for the system at
|
||||
** hand.
|
||||
*/
|
||||
#define MAX_ASCTIME_BUF_SIZE (2*3+5*INT_STRLEN_MAXIMUM(int)+7+2+1+1)
|
||||
|
||||
static char buf_asctime[MAX_ASCTIME_BUF_SIZE];
|
||||
|
||||
/*
|
||||
** A la ISO/IEC 9945-1, ANSI/IEEE Std 1003.1, 2004 Edition.
|
||||
*/
|
||||
static char buf_asctime[2*3 + 5*INT_STRLEN_MAXIMUM(int) + 7 + 2 + 1 + 1];
|
||||
|
||||
char *
|
||||
asctime_r(timeptr, buf)
|
||||
register const struct tm * timeptr;
|
||||
char * buf;
|
||||
asctime_r(register const struct tm *timeptr, char *buf)
|
||||
{
|
||||
static const char wday_name[][3] = {
|
||||
static const char wday_name[][4] = {
|
||||
"Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"
|
||||
};
|
||||
static const char mon_name[][3] = {
|
||||
static const char mon_name[][4] = {
|
||||
"Jan", "Feb", "Mar", "Apr", "May", "Jun",
|
||||
"Jul", "Aug", "Sep", "Oct", "Nov", "Dec"
|
||||
};
|
||||
register const char * wn;
|
||||
register const char * mn;
|
||||
char year[INT_STRLEN_MAXIMUM(int) + 2];
|
||||
char result[MAX_ASCTIME_BUF_SIZE];
|
||||
char result[sizeof buf_asctime];
|
||||
|
||||
if (timeptr == NULL) {
|
||||
errno = EINVAL;
|
||||
@ -107,11 +81,11 @@ char * buf;
|
||||
** Assume that strftime is unaffected by other out-of-range members
|
||||
** (e.g., timeptr->tm_mday) when processing "%Y".
|
||||
*/
|
||||
(void) strftime(year, sizeof year, "%Y", timeptr);
|
||||
strftime(year, sizeof year, "%Y", timeptr);
|
||||
/*
|
||||
** We avoid using snprintf since it's not available on all systems.
|
||||
*/
|
||||
(void) sprintf(result,
|
||||
sprintf(result,
|
||||
((strlen(year) <= 4) ? ASCTIME_FMT : ASCTIME_FMT_B),
|
||||
wn, mn,
|
||||
timeptr->tm_mday, timeptr->tm_hour,
|
||||
@ -120,22 +94,13 @@ char * buf;
|
||||
if (strlen(result) < STD_ASCTIME_BUF_SIZE || buf == buf_asctime)
|
||||
return strcpy(buf, result);
|
||||
else {
|
||||
#ifdef EOVERFLOW
|
||||
errno = EOVERFLOW;
|
||||
#else /* !defined EOVERFLOW */
|
||||
errno = EINVAL;
|
||||
#endif /* !defined EOVERFLOW */
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
** A la ISO/IEC 9945-1, ANSI/IEEE Std 1003.1, 2004 Edition.
|
||||
*/
|
||||
|
||||
char *
|
||||
asctime(timeptr)
|
||||
register const struct tm * timeptr;
|
||||
asctime(register const struct tm *timeptr)
|
||||
{
|
||||
return asctime_r(timeptr, buf_asctime);
|
||||
}
|
||||
|
173
calendars
Normal file
173
calendars
Normal file
@ -0,0 +1,173 @@
|
||||
----- Calendrical issues -----
|
||||
|
||||
As mentioned in Theory.html, although calendrical issues are out of
|
||||
scope for tzdb, they indicate the sort of problems that we would run
|
||||
into if we extended tzdb further into the past. The following
|
||||
information and sources go beyond Theory.html's brief discussion.
|
||||
They sometimes disagree.
|
||||
|
||||
|
||||
France
|
||||
|
||||
Gregorian calendar adopted 1582-12-20.
|
||||
French Revolutionary calendar used 1793-11-24 through 1805-12-31,
|
||||
and (in Paris only) 1871-05-06 through 1871-05-23.
|
||||
|
||||
|
||||
Russia
|
||||
|
||||
From Chris Carrier (1996-12-02):
|
||||
On 1929-10-01 the Soviet Union instituted an "Eternal Calendar"
|
||||
with 30-day months plus 5 holidays, with a 5-day week.
|
||||
On 1931-12-01 it changed to a 6-day week; in 1934 it reverted to the
|
||||
Gregorian calendar while retaining the 6-day week; on 1940-06-27 it
|
||||
reverted to the 7-day week. With the 6-day week the usual days
|
||||
off were the 6th, 12th, 18th, 24th and 30th of the month.
|
||||
(Source: Evitiar Zerubavel, _The Seven Day Circle_)
|
||||
|
||||
|
||||
Mark Brader reported a similar story in "The Book of Calendars", edited
|
||||
by Frank Parise (1982, Facts on File, ISBN 0-8719-6467-8), page 377. But:
|
||||
|
||||
From: Petteri Sulonen (via Usenet)
|
||||
Date: 14 Jan 1999 00:00:00 GMT
|
||||
...
|
||||
|
||||
If your source is correct, how come documents between 1929 and 1940 were
|
||||
still dated using the conventional, Gregorian calendar?
|
||||
|
||||
I can post a scan of a document dated December 1, 1934, signed by
|
||||
Yenukidze, the secretary, on behalf of Kalinin, the President of the
|
||||
Executive Committee of the Supreme Soviet, if you like.
|
||||
|
||||
|
||||
|
||||
Sweden (and Finland)
|
||||
|
||||
From: Mark Brader
|
||||
Subject: Re: Gregorian reform - a part of locale?
|
||||
<news:1996Jul6.012937.29190@sq.com>
|
||||
Date: 1996-07-06
|
||||
|
||||
In 1700, Denmark made the transition from Julian to Gregorian. Sweden
|
||||
decided to *start* a transition in 1700 as well, but rather than have one of
|
||||
those unsightly calendar gaps :-), they simply decreed that the next leap
|
||||
year after 1696 would be in 1744 - putting the whole country on a calendar
|
||||
different from both Julian and Gregorian for a period of 40 years.
|
||||
|
||||
However, in 1704 something went wrong and the plan was not carried through;
|
||||
they did, after all, have a leap year that year. And one in 1708. In 1712
|
||||
they gave it up and went back to Julian, putting 30 days in February that
|
||||
year!...
|
||||
|
||||
Then in 1753, Sweden made the transition to Gregorian in the usual manner,
|
||||
getting there only 13 years behind the original schedule.
|
||||
|
||||
(A previous posting of this story was challenged, and Swedish readers
|
||||
produced the following references to support it: "Tideräkning och historia"
|
||||
by Natanael Beckman (1924) and "Tid, en bok om tideräkning och
|
||||
kalenderväsen" by Lars-Olof Lodén (1968).
|
||||
|
||||
|
||||
Grotefend's data
|
||||
|
||||
From: "Michael Palmer" [with two obvious typos fixed]
|
||||
Subject: Re: Gregorian Calendar (was Re: Another FHC related question
|
||||
Newsgroups: soc.genealogy.german
|
||||
Date: Tue, 9 Feb 1999 02:32:48 -800
|
||||
...
|
||||
|
||||
The following is a(n incomplete) listing, arranged chronologically, of
|
||||
European states, with the date they converted from the Julian to the
|
||||
Gregorian calendar:
|
||||
|
||||
04/15 Oct 1582 - Italy (with exceptions), Spain, Portugal, Poland (Roman
|
||||
Catholics and Danzig only)
|
||||
09/20 Dec 1582 - France, Lorraine
|
||||
|
||||
21 Dec 1582/
|
||||
01 Jan 1583 - Holland, Brabant, Flanders, Hennegau
|
||||
10/21 Feb 1583 - bishopric of Liege (Lüttich)
|
||||
13/24 Feb 1583 - bishopric of Augsburg
|
||||
04/15 Oct 1583 - electorate of Trier
|
||||
05/16 Oct 1583 - Bavaria, bishoprics of Freising, Eichstedt, Regensburg,
|
||||
Salzburg, Brixen
|
||||
13/24 Oct 1583 - Austrian Oberelsaß and Breisgau
|
||||
20/31 Oct 1583 - bishopric of Basel
|
||||
02/13 Nov 1583 - duchy of Jülich-Berg
|
||||
02/13 Nov 1583 - electorate and city of Köln
|
||||
04/15 Nov 1583 - bishopric of Würzburg
|
||||
11/22 Nov 1583 - electorate of Mainz
|
||||
16/27 Nov 1583 - bishopric of Strassburg and the margraviate of Baden
|
||||
17/28 Nov 1583 - bishopric of Münster and duchy of Cleve
|
||||
14/25 Dec 1583 - Steiermark
|
||||
|
||||
06/17 Jan 1584 - Austria and Bohemia
|
||||
11/22 Jan 1584 - Lucerne, Uri, Schwyz, Zug, Freiburg, Solothurn
|
||||
12/23 Jan 1584 - Silesia and the Lausitz
|
||||
22 Jan/
|
||||
02 Feb 1584 - Hungary (legally on 21 Oct 1587)
|
||||
Jun 1584 - Unterwalden
|
||||
01/12 Jul 1584 - duchy of Westfalen
|
||||
|
||||
16/27 Jun 1585 - bishopric of Paderborn
|
||||
|
||||
14/25 Dec 1590 - Transylvania
|
||||
|
||||
22 Aug/
|
||||
02 Sep 1612 - duchy of Prussia
|
||||
|
||||
13/24 Dec 1614 - Pfalz-Neuburg
|
||||
|
||||
1617 - duchy of Kurland (reverted to the Julian calendar in
|
||||
1796)
|
||||
|
||||
1624 - bishopric of Osnabrück
|
||||
|
||||
1630 - bishopric of Minden
|
||||
|
||||
15/26 Mar 1631 - bishopric of Hildesheim
|
||||
|
||||
1655 - Kanton Wallis
|
||||
|
||||
05/16 Feb 1682 - city of Strassburg
|
||||
|
||||
18 Feb/
|
||||
01 Mar 1700 - Protestant Germany (including Swedish possessions in
|
||||
Germany), Denmark, Norway
|
||||
30 Jun/
|
||||
12 Jul 1700 - Gelderland, Zutphen
|
||||
10 Nov/
|
||||
12 Dec 1700 - Utrecht, Overijssel
|
||||
|
||||
31 Dec 1700/
|
||||
12 Jan 1701 - Friesland, Groningen, Zürich, Bern, Basel, Geneva,
|
||||
Thurgau, and Schaffhausen
|
||||
|
||||
1724 - Glarus, Appenzell, and the city of St. Gallen
|
||||
|
||||
01 Jan 1750 - Pisa and Florence
|
||||
|
||||
02/14 Sep 1752 - Great Britain
|
||||
|
||||
17 Feb/
|
||||
01 Mar 1753 - Sweden
|
||||
|
||||
1760-1812 - Graubünden
|
||||
|
||||
The Russian empire (including Finland and the Baltic states) did not
|
||||
convert to the Gregorian calendar until the Soviet revolution of 1917.
|
||||
|
||||
Source: H. Grotefend, _Taschenbuch der Zeitrechnung des deutschen
|
||||
Mittelalters und der Neuzeit_, herausgegeben von Dr. O. Grotefend
|
||||
(Hannover: Hahnsche Buchhandlung, 1941), pp. 26-28.
|
||||
|
||||
-----
|
||||
|
||||
This file is in the public domain, so clarified as of 2009-05-17 by
|
||||
Arthur David Olson.
|
||||
|
||||
-----
|
||||
Local Variables:
|
||||
coding: utf-8
|
||||
End:
|
159
checktab.awk
159
checktab.awk
@ -1,159 +0,0 @@
|
||||
# Check tz tables for consistency.
|
||||
|
||||
# @(#)checktab.awk 8.1
|
||||
|
||||
# Contributed by Paul Eggert.
|
||||
|
||||
BEGIN {
|
||||
FS = "\t"
|
||||
|
||||
if (!iso_table) iso_table = "iso3166.tab"
|
||||
if (!zone_table) zone_table = "zone.tab"
|
||||
if (!want_warnings) want_warnings = -1
|
||||
|
||||
while (getline <iso_table) {
|
||||
iso_NR++
|
||||
if ($0 ~ /^#/) continue
|
||||
if (NF != 2) {
|
||||
printf "%s:%d: wrong number of columns\n", \
|
||||
iso_table, iso_NR >>"/dev/stderr"
|
||||
status = 1
|
||||
}
|
||||
cc = $1
|
||||
name = $2
|
||||
if (cc !~ /^[A-Z][A-Z]$/) {
|
||||
printf "%s:%d: invalid country code `%s'\n", \
|
||||
iso_table, iso_NR, cc >>"/dev/stderr"
|
||||
status = 1
|
||||
}
|
||||
if (cc <= cc0) {
|
||||
if (cc == cc0) {
|
||||
s = "duplicate";
|
||||
} else {
|
||||
s = "out of order";
|
||||
}
|
||||
|
||||
printf "%s:%d: country code `%s' is %s\n", \
|
||||
iso_table, iso_NR, cc, s \
|
||||
>>"/dev/stderr"
|
||||
status = 1
|
||||
}
|
||||
cc0 = cc
|
||||
if (name2cc[name]) {
|
||||
printf "%s:%d: `%s' and `%s' have the sname name\n", \
|
||||
iso_table, iso_NR, name2cc[name], cc \
|
||||
>>"/dev/stderr"
|
||||
status = 1
|
||||
}
|
||||
name2cc[name] = cc
|
||||
cc2name[cc] = name
|
||||
cc2NR[cc] = iso_NR
|
||||
}
|
||||
|
||||
zone_table = "zone.tab"
|
||||
cc0 = ""
|
||||
|
||||
while (getline <zone_table) {
|
||||
zone_NR++
|
||||
if ($0 ~ /^#/) continue
|
||||
if (NF != 3 && NF != 4) {
|
||||
printf "%s:%d: wrong number of columns\n", \
|
||||
zone_table, zone_NR >>"/dev/stderr"
|
||||
status = 1
|
||||
}
|
||||
cc = $1
|
||||
coordinates = $2
|
||||
tz = $3
|
||||
comments = $4
|
||||
if (cc < cc0) {
|
||||
printf "%s:%d: country code `%s' is out of order\n", \
|
||||
zone_table, zone_NR, cc >>"/dev/stderr"
|
||||
status = 1
|
||||
}
|
||||
cc0 = cc
|
||||
if (tz2cc[tz]) {
|
||||
printf "%s:%d: %s: duplicate TZ column\n", \
|
||||
zone_table, zone_NR, tz >>"/dev/stderr"
|
||||
status = 1
|
||||
}
|
||||
tz2cc[tz] = cc
|
||||
tz2comments[tz] = comments
|
||||
tz2NR[tz] = zone_NR
|
||||
if (cc2name[cc]) {
|
||||
cc_used[cc]++
|
||||
} else {
|
||||
printf "%s:%d: %s: unknown country code\n", \
|
||||
zone_table, zone_NR, cc >>"/dev/stderr"
|
||||
status = 1
|
||||
}
|
||||
if (coordinates !~ /^[-+][0-9][0-9][0-5][0-9][-+][01][0-9][0-9][0-5][0-9]$/ \
|
||||
&& coordinates !~ /^[-+][0-9][0-9][0-5][0-9][0-5][0-9][-+][01][0-9][0-9][0-5][0-9][0-5][0-9]$/) {
|
||||
printf "%s:%d: %s: invalid coordinates\n", \
|
||||
zone_table, zone_NR, coordinates >>"/dev/stderr"
|
||||
status = 1
|
||||
}
|
||||
}
|
||||
|
||||
for (tz in tz2cc) {
|
||||
if (cc_used[tz2cc[tz]] == 1) {
|
||||
if (tz2comments[tz]) {
|
||||
printf "%s:%d: unnecessary comment `%s'\n", \
|
||||
zone_table, tz2NR[tz], tz2comments[tz] \
|
||||
>>"/dev/stderr"
|
||||
status = 1
|
||||
}
|
||||
} else {
|
||||
if (!tz2comments[tz]) {
|
||||
printf "%s:%d: missing comment\n", \
|
||||
zone_table, tz2NR[tz] >>"/dev/stderr"
|
||||
status = 1
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
FS = " "
|
||||
}
|
||||
|
||||
{
|
||||
tz = ""
|
||||
if ($1 == "Zone") tz = $2
|
||||
if ($1 == "Link") {
|
||||
# Ignore Link commands if source and destination basenames
|
||||
# are identical, e.g. Europe/Istanbul versus Asia/Istanbul.
|
||||
src = $2
|
||||
dst = $3
|
||||
while ((i = index(src, "/"))) src = substr(src, i+1)
|
||||
while ((i = index(dst, "/"))) dst = substr(dst, i+1)
|
||||
if (src != dst) tz = $3
|
||||
}
|
||||
if (tz && tz ~ /\//) {
|
||||
if (!tz2cc[tz]) {
|
||||
printf "%s: no data for `%s'\n", zone_table, tz \
|
||||
>>"/dev/stderr"
|
||||
status = 1
|
||||
}
|
||||
zoneSeen[tz] = 1
|
||||
}
|
||||
}
|
||||
|
||||
END {
|
||||
for (tz in tz2cc) {
|
||||
if (!zoneSeen[tz]) {
|
||||
printf "%s:%d: no Zone table for `%s'\n", \
|
||||
zone_table, tz2NR[tz], tz >>"/dev/stderr"
|
||||
status = 1
|
||||
}
|
||||
}
|
||||
|
||||
if (0 < want_warnings) {
|
||||
for (cc in cc2name) {
|
||||
if (!cc_used[cc]) {
|
||||
printf "%s:%d: warning: " \
|
||||
"no Zone entries for %s (%s)\n", \
|
||||
iso_table, cc2NR[cc], cc, cc2name[cc]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
exit status
|
||||
}
|
90
date.1
90
date.1
@ -4,28 +4,32 @@ date \- show and set date and time
|
||||
.SH SYNOPSIS
|
||||
.if n .nh
|
||||
.if n .na
|
||||
.ie \n(.g .ds - \f(CW-\fP
|
||||
.el .ds - \-
|
||||
.B date
|
||||
[
|
||||
.B \-u
|
||||
.B \*-u
|
||||
] [
|
||||
.B \-c
|
||||
.B \*-c
|
||||
] [
|
||||
.B \-n
|
||||
] [
|
||||
.B \-d
|
||||
dsttype
|
||||
] [
|
||||
.B \-t
|
||||
minutes-west
|
||||
] [
|
||||
\fB\-a \fR[\fB+\fR|\fB-]\fIsss\fB.\fIfff\fR
|
||||
.B \*-r
|
||||
.I seconds
|
||||
] [
|
||||
.BI + format
|
||||
] [
|
||||
\fR[\fIyyyy\fR]\fImmddhhmm\fR[\fIyy\fR][\fB.\fIss\fR]
|
||||
]
|
||||
.SH DESCRIPTION
|
||||
.I Date
|
||||
.ie '\(lq'' .ds lq \&"\"
|
||||
.el .ds lq \(lq\"
|
||||
.ie '\(rq'' .ds rq \&"\"
|
||||
.el .ds rq \(rq\"
|
||||
.de q
|
||||
\\$3\*(lq\\$1\*(rq\\$2
|
||||
..
|
||||
The
|
||||
.B date
|
||||
command
|
||||
without arguments writes the date and time to the standard output in
|
||||
the form
|
||||
.ce 1
|
||||
@ -39,13 +43,13 @@ replaced by the local time zone's abbreviation
|
||||
environment variable if set).
|
||||
The exact output format depends on the locale.
|
||||
.PP
|
||||
If a command-line argument starts with a plus sign
|
||||
.RB (` + '),
|
||||
If a command-line argument starts with a plus sign (\c
|
||||
.q "\fB+\fP" ),
|
||||
the rest of the argument is used as a
|
||||
.I format
|
||||
that controls what appears in the output.
|
||||
In the format, when a percent sign
|
||||
.RB (` % ')
|
||||
In the format, when a percent sign (\c
|
||||
.q "\fB%\fP"
|
||||
appears,
|
||||
it and the character after it are not output,
|
||||
but rather identify part of the date or time
|
||||
@ -88,6 +92,7 @@ to be output in a particular way
|
||||
%X 14:54:40 Time*
|
||||
%y 89 Last two digits of year
|
||||
%Y 1989 Year in full
|
||||
%z -0500 Numeric time zone
|
||||
%Z EST Time zone abbreviation
|
||||
%+ Wed Mar 8 14:54:40 EST 1989 Default output format*
|
||||
.if t .in -.5i
|
||||
@ -103,7 +108,8 @@ a newline character is always added at the end of the output.
|
||||
.PP
|
||||
In Sunday-based week numbering,
|
||||
the first Sunday of the year begins week 1;
|
||||
days preceding it are part of ``week 0.''
|
||||
days preceding it are part of
|
||||
.q "week 0" .
|
||||
In Monday-based week numbering,
|
||||
the first Monday of the year begins week 1.
|
||||
.PP
|
||||
@ -130,48 +136,32 @@ the seconds part of the new time; if no seconds are given, zero is assumed.
|
||||
.PP
|
||||
These options are available:
|
||||
.TP
|
||||
.BR \-u " or " \-c
|
||||
Use UTC when setting and showing the date and time.
|
||||
.BR \*-u " or " \*-c
|
||||
Use Universal Time when setting and showing the date and time.
|
||||
.TP
|
||||
.B \-n
|
||||
Do not notify other networked systems of the time change.
|
||||
.TP
|
||||
.BI "\-d " dsttype
|
||||
Set the kernel-stored Daylight Saving Time type to the given value.
|
||||
(The kernel-stored DST type is used mostly by ``old'' binaries.)
|
||||
.TP
|
||||
.BI "\-t " minutes-west
|
||||
Set the kernel-stored ``minutes west of UTC'' value to the one given on the
|
||||
command line.
|
||||
(The kernel-stored DST type is used mostly by ``old'' binaries.)
|
||||
.TP
|
||||
.BI "\-a " adjustment
|
||||
Change the time forward (or backward) by the number of seconds
|
||||
(and fractions thereof) specified in the
|
||||
.I adjustment\^
|
||||
argument.
|
||||
Either the seconds part or the fractions part of the argument (but not both)
|
||||
may be omitted.
|
||||
On BSD-based systems,
|
||||
the adjustment is made by changing the rate at which time advances;
|
||||
on System-V-based systems, the adjustment is made by changing the time.
|
||||
.BI "\*-r " seconds
|
||||
Output the date that corresponds to
|
||||
.I seconds
|
||||
past the epoch of 1970-01-01 00:00:00 UTC, where
|
||||
.I seconds
|
||||
should be an integer, either decimal, octal (leading 0), or
|
||||
hexadecimal (leading 0x), preceded by an optional sign.
|
||||
.SH FILES
|
||||
.ta \w'/usr/local/etc/zoneinfo/posixrules\0\0'u
|
||||
.ta \w'/usr/share/zoneinfo/posixrules\0\0'u
|
||||
/etc/localtime local timezone file
|
||||
.br
|
||||
/usr/lib/locale/\f2L\fP/LC_TIME description of time locale \f2L\fP
|
||||
.br
|
||||
/usr/local/etc/zoneinfo time zone information directory
|
||||
/usr/share/zoneinfo timezone information directory
|
||||
.br
|
||||
/usr/local/etc/zoneinfo/localtime local time zone file
|
||||
/usr/share/zoneinfo/posixrules used with POSIX-style TZ's
|
||||
.br
|
||||
/usr/local/etc/zoneinfo/posixrules used with POSIX-style TZ's
|
||||
.br
|
||||
/usr/local/etc/zoneinfo/GMT for UTC leap seconds
|
||||
/usr/share/zoneinfo/GMT for UTC leap seconds
|
||||
.sp
|
||||
If
|
||||
.B /usr/local/etc/zoneinfo/GMT
|
||||
.B /usr/share/zoneinfo/GMT
|
||||
is absent,
|
||||
UTC leap seconds are loaded from
|
||||
.BR /usr/local/etc/zoneinfo/posixrules .
|
||||
.\" @(#)date.1 8.2
|
||||
.BR /usr/share/zoneinfo/posixrules .
|
||||
.\" This file is in the public domain, so clarified as of
|
||||
.\" 2009-05-17 by Arthur David Olson.
|
||||
|
202
date.1.txt
202
date.1.txt
@ -1,127 +1,107 @@
|
||||
NAME
|
||||
DATE(1) General Commands Manual DATE(1)
|
||||
|
||||
date - show and set date and time
|
||||
NAME
|
||||
date - show and set date and time
|
||||
|
||||
SYNOPSIS
|
||||
date [ -u ] [ -c ] [ -n ] [ -d dsttype ] [ -t minutes-west ]
|
||||
[ -a [+|-]sss.fff ] [ +format ] [ [yyyy]mmddhhmm[yy][.ss] ]
|
||||
date [ -u ] [ -c ] [ -r seconds ] [ +format ] [ [yyyy]mmddhhmm[yy][.ss]
|
||||
]
|
||||
|
||||
DESCRIPTION
|
||||
Date without arguments writes the date and time to the
|
||||
standard output in the form
|
||||
Wed Mar 8 14:54:40 EST 1989
|
||||
with EST replaced by the local time zone's abbreviation (or
|
||||
by the abbreviation for the time zone specified in the TZ
|
||||
environment variable if set). The exact output format
|
||||
depends on the locale.
|
||||
The date command without arguments writes the date and time to the
|
||||
standard output in the form
|
||||
Wed Mar 8 14:54:40 EST 1989
|
||||
with EST replaced by the local time zone's abbreviation (or by the
|
||||
abbreviation for the time zone specified in the TZ environment variable
|
||||
if set). The exact output format depends on the locale.
|
||||
|
||||
If a command-line argument starts with a plus sign (`+'),
|
||||
the rest of the argument is used as a format that controls
|
||||
what appears in the output. In the format, when a percent
|
||||
sign (`%') appears, it and the character after it are not
|
||||
output, but rather identify part of the date or time to be
|
||||
output in a particular way (or identify a special character
|
||||
to output):
|
||||
If a command-line argument starts with a plus sign ("+"), the rest of
|
||||
the argument is used as a format that controls what appears in the
|
||||
output. In the format, when a percent sign ("%" appears, it and the
|
||||
character after it are not output, but rather identify part of the date
|
||||
or time to be output in a particular way (or identify a special
|
||||
character to output):
|
||||
|
||||
Sample output Explanation
|
||||
%a Wed Abbreviated weekday name*
|
||||
%A Wednesday Full weekday name*
|
||||
%b Mar Abbreviated month name*
|
||||
%B March Full month name*
|
||||
%c Wed Mar 08 14:54:40 1989 Date and time*
|
||||
%C 19 Century
|
||||
%d 08 Day of month (always two digits)
|
||||
%D 03/08/89 Month/day/year (eight characters)
|
||||
%e 8 Day of month (leading zero blanked)
|
||||
%h Mar Abbreviated month name*
|
||||
%H 14 24-hour-clock hour (two digits)
|
||||
%I 02 12-hour-clock hour (two digits)
|
||||
%j 067 Julian day number (three digits)
|
||||
%k 2 12-hour-clock hour (leading zero blanked)
|
||||
%l 14 24-hour-clock hour (leading zero blanked)
|
||||
%m 03 Month number (two digits)
|
||||
%M 54 Minute (two digits)
|
||||
%n \n newline character
|
||||
%p PM AM/PM designation
|
||||
%r 02:54:40 PM Hour:minute:second AM/PM designation
|
||||
%R 14:54 Hour:minute
|
||||
%S 40 Second (two digits)
|
||||
%t \t tab character
|
||||
%T 14:54:40 Hour:minute:second
|
||||
%U 10 Sunday-based week number (two digits)
|
||||
%w 3 Day number (one digit, Sunday is 0)
|
||||
%W 10 Monday-based week number (two digits)
|
||||
%x 03/08/89 Date*
|
||||
%X 14:54:40 Time*
|
||||
%y 89 Last two digits of year
|
||||
%Y 1989 Year in full
|
||||
%Z EST Time zone abbreviation
|
||||
%+ Wed Mar 8 14:54:40 EST 1989 Default output format*
|
||||
* The exact output depends on the locale.
|
||||
Sample output Explanation
|
||||
%a Wed Abbreviated weekday name*
|
||||
%A Wednesday Full weekday name*
|
||||
%b Mar Abbreviated month name*
|
||||
%B March Full month name*
|
||||
%c Wed Mar 08 14:54:40 1989 Date and time*
|
||||
%C 19 Century
|
||||
%d 08 Day of month (always two digits)
|
||||
%D 03/08/89 Month/day/year (eight characters)
|
||||
%e 8 Day of month (leading zero blanked)
|
||||
%h Mar Abbreviated month name*
|
||||
%H 14 24-hour-clock hour (two digits)
|
||||
%I 02 12-hour-clock hour (two digits)
|
||||
%j 067 Julian day number (three digits)
|
||||
%k 2 12-hour-clock hour (leading zero blanked)
|
||||
%l 14 24-hour-clock hour (leading zero blanked)
|
||||
%m 03 Month number (two digits)
|
||||
%M 54 Minute (two digits)
|
||||
%n \n newline character
|
||||
%p PM AM/PM designation
|
||||
%r 02:54:40 PM Hour:minute:second AM/PM designation
|
||||
%R 14:54 Hour:minute
|
||||
%S 40 Second (two digits)
|
||||
%t \t tab character
|
||||
%T 14:54:40 Hour:minute:second
|
||||
%U 10 Sunday-based week number (two digits)
|
||||
%w 3 Day number (one digit, Sunday is 0)
|
||||
%W 10 Monday-based week number (two digits)
|
||||
%x 03/08/89 Date*
|
||||
%X 14:54:40 Time*
|
||||
%y 89 Last two digits of year
|
||||
%Y 1989 Year in full
|
||||
%z -0500 Numeric time zone
|
||||
%Z EST Time zone abbreviation
|
||||
%+ Wed Mar 8 14:54:40 EST 1989 Default output format*
|
||||
* The exact output depends on the locale.
|
||||
|
||||
If a character other than one of those shown above appears
|
||||
after a percent sign in the format, that following character
|
||||
is output. All other characters in the format are copied
|
||||
unchanged to the output; a newline character is always added
|
||||
at the end of the output.
|
||||
In Sunday-based week numbering, the first Sunday of the year
|
||||
begins week 1; days preceding it are part of ``week 0.'' In
|
||||
Monday-based week numbering, the first Monday of the year
|
||||
begins week 1.
|
||||
If a character other than one of those shown above appears after a
|
||||
percent sign in the format, that following character is output. All
|
||||
other characters in the format are copied unchanged to the output; a
|
||||
newline character is always added at the end of the output.
|
||||
|
||||
To set the date, use a command line argument with one of the
|
||||
following forms:
|
||||
1454 24-hour-clock hours (first two digits) and minutes
|
||||
081454 Month day (first two digits), hours, and minutes
|
||||
03081454 Month (two digits, January is 01), month day, hours, minutes
|
||||
8903081454 Year, month, month day, hours, minutes
|
||||
0308145489 Month, month day, hours, minutes, year
|
||||
(on System V-compatible systems)
|
||||
030814541989 Month, month day, hours, minutes, four-digit year
|
||||
198903081454 Four-digit year, month, month day, hours, minutes
|
||||
If the century, year, month, or month day is not given, the
|
||||
current value is used. Any of the above forms may be
|
||||
followed by a period and two digits that give the seconds
|
||||
part of the new time; if no seconds are given, zero is
|
||||
assumed.
|
||||
In Sunday-based week numbering, the first Sunday of the year begins
|
||||
week 1; days preceding it are part of "week 0". In Monday-based week
|
||||
numbering, the first Monday of the year begins week 1.
|
||||
|
||||
These options are available:
|
||||
To set the date, use a command line argument with one of the following
|
||||
forms:
|
||||
1454 24-hour-clock hours (first two digits) and minutes
|
||||
081454 Month day (first two digits), hours, and minutes
|
||||
03081454 Month (two digits, January is 01), month day, hours, minutes
|
||||
8903081454 Year, month, month day, hours, minutes
|
||||
0308145489 Month, month day, hours, minutes, year
|
||||
(on System V-compatible systems)
|
||||
030814541989 Month, month day, hours, minutes, four-digit year
|
||||
198903081454 Four-digit year, month, month day, hours, minutes
|
||||
If the century, year, month, or month day is not given, the current
|
||||
value is used. Any of the above forms may be followed by a period and
|
||||
two digits that give the seconds part of the new time; if no seconds
|
||||
are given, zero is assumed.
|
||||
|
||||
-u or -c
|
||||
Use UTC when setting and showing the date and time.
|
||||
These options are available:
|
||||
|
||||
-n Do not notify other networked systems of the time
|
||||
change.
|
||||
-u or -c
|
||||
Use Universal Time when setting and showing the date and time.
|
||||
|
||||
-d dsttype
|
||||
Set the kernel-stored Daylight Saving Time type to the
|
||||
given value. (The kernel-stored DST type is used
|
||||
mostly by ``old'' binaries.)
|
||||
|
||||
-t minutes-west
|
||||
Set the kernel-stored ``minutes west of UTC'' value to
|
||||
the one given on the command line. (The kernel-stored
|
||||
DST type is used mostly by ``old'' binaries.)
|
||||
|
||||
-a adjustment
|
||||
Change the time forward (or backward) by the number of
|
||||
seconds (and fractions thereof) specified in the
|
||||
adjustment argument. Either the seconds part or the
|
||||
fractions part of the argument (but not both) may be
|
||||
omitted. On BSD-based systems, the adjustment is made
|
||||
by changing the rate at which time advances; on System-
|
||||
V-based systems, the adjustment is made by changing the
|
||||
time.
|
||||
-r seconds
|
||||
Output the date that corresponds to seconds past the epoch of
|
||||
1970-01-01 00:00:00 UTC, where seconds should be an integer,
|
||||
either decimal, octal (leading 0), or hexadecimal (leading 0x),
|
||||
preceded by an optional sign.
|
||||
|
||||
FILES
|
||||
/usr/lib/locale/L/LC_TIME description of time
|
||||
locale L
|
||||
/usr/local/etc/zoneinfo time zone information
|
||||
directory
|
||||
/usr/local/etc/zoneinfo/localtime local time zone file
|
||||
/usr/local/etc/zoneinfo/posixrules used with POSIX-style
|
||||
TZ's
|
||||
/usr/local/etc/zoneinfo/GMT for UTC leap seconds
|
||||
/etc/localtime local timezone file
|
||||
/usr/lib/locale/L/LC_TIME description of time locale L
|
||||
/usr/share/zoneinfo timezone information directory
|
||||
/usr/share/zoneinfo/posixrules used with POSIX-style TZ's
|
||||
/usr/share/zoneinfo/GMT for UTC leap seconds
|
||||
|
||||
If /usr/local/etc/zoneinfo/GMT is absent, UTC leap seconds
|
||||
are loaded from /usr/local/etc/zoneinfo/posixrules.
|
||||
If /usr/share/zoneinfo/GMT is absent, UTC leap seconds are loaded from
|
||||
/usr/share/zoneinfo/posixrules.
|
||||
|
||||
DATE(1)
|
||||
|
81
difftime.c
81
difftime.c
@ -1,65 +1,60 @@
|
||||
/* Return the difference between two timestamps. */
|
||||
|
||||
/*
|
||||
** This file is in the public domain, so clarified as of
|
||||
** 1996-06-05 by Arthur David Olson.
|
||||
*/
|
||||
|
||||
#ifndef lint
|
||||
#ifndef NOID
|
||||
static char elsieid[] = "@(#)difftime.c 8.1";
|
||||
#endif /* !defined NOID */
|
||||
#endif /* !defined lint */
|
||||
|
||||
/*LINTLIBRARY*/
|
||||
|
||||
#include "private.h" /* for time_t, TYPE_INTEGRAL, and TYPE_SIGNED */
|
||||
#include "private.h" /* for time_t and TYPE_SIGNED */
|
||||
|
||||
/* Return -X as a double. Using this avoids casting to 'double'. */
|
||||
static double
|
||||
dminus(double x)
|
||||
{
|
||||
return -x;
|
||||
}
|
||||
|
||||
double
|
||||
difftime(time1, time0)
|
||||
const time_t time1;
|
||||
const time_t time0;
|
||||
difftime(time_t time1, time_t time0)
|
||||
{
|
||||
/*
|
||||
** If (sizeof (double) > sizeof (time_t)) simply convert and subtract
|
||||
** If double is large enough, simply convert and subtract
|
||||
** (assuming that the larger type has more precision).
|
||||
** This is the common real-world case circa 2004.
|
||||
*/
|
||||
if (sizeof (double) > sizeof (time_t))
|
||||
return (double) time1 - (double) time0;
|
||||
if (!TYPE_INTEGRAL(time_t)) {
|
||||
/*
|
||||
** time_t is floating.
|
||||
*/
|
||||
return time1 - time0;
|
||||
}
|
||||
if (!TYPE_SIGNED(time_t)) {
|
||||
/*
|
||||
** time_t is integral and unsigned.
|
||||
** The difference of two unsigned values can't overflow
|
||||
** if the minuend is greater than or equal to the subtrahend.
|
||||
*/
|
||||
if (time1 >= time0)
|
||||
return time1 - time0;
|
||||
else return -((double) (time0 - time1));
|
||||
if (sizeof(time_t) < sizeof(double)) {
|
||||
double t1 = time1, t0 = time0;
|
||||
return t1 - t0;
|
||||
}
|
||||
|
||||
/*
|
||||
** The difference of two unsigned values can't overflow
|
||||
** if the minuend is greater than or equal to the subtrahend.
|
||||
*/
|
||||
if (!TYPE_SIGNED(time_t))
|
||||
return time0 <= time1 ? time1 - time0 : dminus(time0 - time1);
|
||||
|
||||
/* Use uintmax_t if wide enough. */
|
||||
if (sizeof(time_t) <= sizeof(uintmax_t)) {
|
||||
uintmax_t t1 = time1, t0 = time0;
|
||||
return time0 <= time1 ? t1 - t0 : dminus(t0 - t1);
|
||||
}
|
||||
|
||||
/*
|
||||
** time_t is integral and signed.
|
||||
** Handle cases where both time1 and time0 have the same sign
|
||||
** (meaning that their difference cannot overflow).
|
||||
*/
|
||||
if ((time1 < 0) == (time0 < 0))
|
||||
return time1 - time0;
|
||||
return time1 - time0;
|
||||
|
||||
/*
|
||||
** time1 and time0 have opposite signs.
|
||||
** Punt if unsigned long is too narrow.
|
||||
** The values have opposite signs and uintmax_t is too narrow.
|
||||
** This suffers from double rounding; attempt to lessen that
|
||||
** by using long double temporaries.
|
||||
*/
|
||||
if (sizeof (unsigned long) < sizeof (time_t))
|
||||
return (double) time1 - (double) time0;
|
||||
/*
|
||||
** Stay calm...decent optimizers will eliminate the complexity below.
|
||||
*/
|
||||
if (time1 >= 0 /* && time0 < 0 */)
|
||||
return (unsigned long) time1 +
|
||||
(unsigned long) (-(time0 + 1)) + 1;
|
||||
return -(double) ((unsigned long) time0 +
|
||||
(unsigned long) (-(time1 + 1)) + 1);
|
||||
{
|
||||
long double t1 = time1, t0 = time0;
|
||||
return t1 - t0;
|
||||
}
|
||||
}
|
||||
|
86
ialloc.c
86
ialloc.c
@ -1,86 +0,0 @@
|
||||
/*
|
||||
** This file is in the public domain, so clarified as of
|
||||
** 2006-07-17 by Arthur David Olson.
|
||||
*/
|
||||
|
||||
#ifndef lint
|
||||
#ifndef NOID
|
||||
static char elsieid[] = "@(#)ialloc.c 8.30";
|
||||
#endif /* !defined NOID */
|
||||
#endif /* !defined lint */
|
||||
|
||||
/*LINTLIBRARY*/
|
||||
|
||||
#include "private.h"
|
||||
|
||||
#define nonzero(n) (((n) == 0) ? 1 : (n))
|
||||
|
||||
char *
|
||||
imalloc(n)
|
||||
const int n;
|
||||
{
|
||||
return malloc((size_t) nonzero(n));
|
||||
}
|
||||
|
||||
char *
|
||||
icalloc(nelem, elsize)
|
||||
int nelem;
|
||||
int elsize;
|
||||
{
|
||||
if (nelem == 0 || elsize == 0)
|
||||
nelem = elsize = 1;
|
||||
return calloc((size_t) nelem, (size_t) elsize);
|
||||
}
|
||||
|
||||
void *
|
||||
irealloc(pointer, size)
|
||||
void * const pointer;
|
||||
const int size;
|
||||
{
|
||||
if (pointer == NULL)
|
||||
return imalloc(size);
|
||||
return realloc((void *) pointer, (size_t) nonzero(size));
|
||||
}
|
||||
|
||||
char *
|
||||
icatalloc(old, new)
|
||||
char * const old;
|
||||
const char * const new;
|
||||
{
|
||||
register char * result;
|
||||
register int oldsize, newsize;
|
||||
|
||||
newsize = (new == NULL) ? 0 : strlen(new);
|
||||
if (old == NULL)
|
||||
oldsize = 0;
|
||||
else if (newsize == 0)
|
||||
return old;
|
||||
else oldsize = strlen(old);
|
||||
if ((result = irealloc(old, oldsize + newsize + 1)) != NULL)
|
||||
if (new != NULL)
|
||||
(void) strcpy(result + oldsize, new);
|
||||
return result;
|
||||
}
|
||||
|
||||
char *
|
||||
icpyalloc(string)
|
||||
const char * const string;
|
||||
{
|
||||
return icatalloc((char *) NULL, string);
|
||||
}
|
||||
|
||||
void
|
||||
ifree(p)
|
||||
char * const p;
|
||||
{
|
||||
if (p != NULL)
|
||||
(void) free(p);
|
||||
}
|
||||
|
||||
void
|
||||
icfree(p)
|
||||
char * const p;
|
||||
{
|
||||
if (p != NULL)
|
||||
(void) free(p);
|
||||
}
|
2359
localtime.c
2359
localtime.c
File diff suppressed because it is too large
Load Diff
295
newctime.3
295
newctime.3
@ -1,43 +1,61 @@
|
||||
.TH NEWCTIME 3
|
||||
.SH NAME
|
||||
asctime, ctime, difftime, gmtime, localtime, mktime \- convert date and time to ASCII
|
||||
asctime, ctime, difftime, gmtime, localtime, mktime \- convert date and time
|
||||
.SH SYNOPSIS
|
||||
.nf
|
||||
.B extern char *tzname[2];
|
||||
.PP
|
||||
.B void tzset()
|
||||
.PP
|
||||
.B #include <sys/types.h>
|
||||
.PP
|
||||
.B char *ctime(clock)
|
||||
.B const time_t *clock;
|
||||
.PP
|
||||
.B double difftime(time1, time0)
|
||||
.B time_t time1;
|
||||
.B time_t time0;
|
||||
.PP
|
||||
.ie \n(.g .ds - \f(CW-\fP
|
||||
.el .ds - \-
|
||||
.B #include <time.h>
|
||||
.PP
|
||||
.B char *asctime(tm)
|
||||
.B const struct tm *tm;
|
||||
.BR "extern char *tzname[];" " /\(** (optional) \(**/"
|
||||
.PP
|
||||
.B struct tm *localtime(clock)
|
||||
.B const time_t *clock;
|
||||
.B char *ctime(time_t const *clock);
|
||||
.PP
|
||||
.B struct tm *gmtime(clock)
|
||||
.B const time_t *clock;
|
||||
.B char *ctime_r(time_t const *clock, char *buf);
|
||||
.PP
|
||||
.B time_t mktime(tm)
|
||||
.B struct tm *tm;
|
||||
.B double difftime(time_t time1, time_t time0);
|
||||
.PP
|
||||
.B cc ... -ltz
|
||||
.B char *asctime(struct tm const *tm);
|
||||
.PP
|
||||
.B "char *asctime_r(struct tm const *restrict tm,"
|
||||
.B " char *restrict result);"
|
||||
.PP
|
||||
.B struct tm *localtime(time_t const *clock);
|
||||
.PP
|
||||
.B "struct tm *localtime_r(time_t const *restrict clock,"
|
||||
.B " struct tm *restrict result);"
|
||||
.PP
|
||||
.B "struct tm *localtime_rz(timezone_t restrict zone,"
|
||||
.B " time_t const *restrict clock,"
|
||||
.B " struct tm *restrict result);"
|
||||
.PP
|
||||
.B struct tm *gmtime(time_t const *clock);
|
||||
.PP
|
||||
.B "struct tm *gmtime_r(time_t const *restrict clock,"
|
||||
.B " struct tm *restrict result);"
|
||||
.PP
|
||||
.B time_t mktime(struct tm *tm);
|
||||
.PP
|
||||
.B "time_t mktime_z(timezone_t restrict zone,"
|
||||
.B " struct tm *restrict tm);"
|
||||
.PP
|
||||
.B cc ... \*-ltz
|
||||
.fi
|
||||
.SH DESCRIPTION
|
||||
.I Ctime\^
|
||||
.ie '\(en'' .ds en \-
|
||||
.el .ds en \(en
|
||||
.ie '\(lq'' .ds lq \&"\"
|
||||
.el .ds lq \(lq\"
|
||||
.ie '\(rq'' .ds rq \&"\"
|
||||
.el .ds rq \(rq\"
|
||||
.de q
|
||||
\\$3\*(lq\\$1\*(rq\\$2
|
||||
..
|
||||
The
|
||||
.B ctime
|
||||
function
|
||||
converts a long integer, pointed to by
|
||||
.IR clock ,
|
||||
representing the time in seconds since
|
||||
00:00:00 UTC, 1970-01-01,
|
||||
and returns a pointer to a
|
||||
string of the form
|
||||
.br
|
||||
@ -59,41 +77,66 @@ These unusual formats are designed to make it less likely that older
|
||||
software that expects exactly 26 bytes of output will mistakenly output
|
||||
misleading values for out-of-range years.
|
||||
.PP
|
||||
.I Localtime\^
|
||||
The
|
||||
.BI * clock
|
||||
timestamp represents the time in seconds since 1970-01-01 00:00:00
|
||||
Coordinated Universal Time (UTC).
|
||||
The POSIX standard says that timestamps must be nonnegative
|
||||
and must ignore leap seconds.
|
||||
Many implementations extend POSIX by allowing negative timestamps,
|
||||
and can therefore represent timestamps that predate the
|
||||
introduction of UTC and are some other flavor of Universal Time (UT).
|
||||
Some implementations support leap seconds, in contradiction to POSIX.
|
||||
.PP
|
||||
The
|
||||
.B localtime
|
||||
and
|
||||
.I gmtime\^
|
||||
return pointers to ``tm'' structures, described below.
|
||||
.I Localtime\^
|
||||
.B gmtime
|
||||
functions
|
||||
return pointers to
|
||||
.q "tm"
|
||||
structures, described below.
|
||||
The
|
||||
.B localtime
|
||||
function
|
||||
corrects for the time zone and any time zone adjustments
|
||||
(such as Daylight Saving Time in the United States).
|
||||
After filling in the ``tm'' structure,
|
||||
.I localtime
|
||||
After filling in the
|
||||
.q "tm"
|
||||
structure,
|
||||
.B localtime
|
||||
sets the
|
||||
.BR tm_isdst 'th
|
||||
element of
|
||||
.B tzname
|
||||
to a pointer to an
|
||||
ASCII string that's the time zone abbreviation to be used with
|
||||
.IR localtime 's
|
||||
to a pointer to a string that's the time zone abbreviation to be used with
|
||||
.BR localtime 's
|
||||
return value.
|
||||
.PP
|
||||
.I Gmtime\^
|
||||
The
|
||||
.B gmtime
|
||||
function
|
||||
converts to Coordinated Universal Time.
|
||||
.PP
|
||||
.I Asctime\^
|
||||
The
|
||||
.B asctime
|
||||
function
|
||||
converts a time value contained in a
|
||||
``tm'' structure to a string,
|
||||
.q "tm"
|
||||
structure to a string,
|
||||
as shown in the above example,
|
||||
and returns a pointer to the string.
|
||||
.PP
|
||||
.I Mktime\^
|
||||
The
|
||||
.B mktime
|
||||
function
|
||||
converts the broken-down time,
|
||||
expressed as local time,
|
||||
in the structure pointed to by
|
||||
.I tm
|
||||
into a calendar time value with the same encoding as that of the values
|
||||
returned by the
|
||||
.I time
|
||||
.B time
|
||||
function.
|
||||
The original values of the
|
||||
.B tm_wday
|
||||
@ -105,16 +148,15 @@ to their normal ranges.
|
||||
(A positive or zero value for
|
||||
.B tm_isdst
|
||||
causes
|
||||
.I mktime
|
||||
to presume initially that summer time (for example, Daylight Saving Time
|
||||
in the U.S.A.)
|
||||
.B mktime
|
||||
to presume initially that daylight saving time
|
||||
respectively,
|
||||
is or is not in effect for the specified time.
|
||||
A negative value for
|
||||
.B tm_isdst
|
||||
causes the
|
||||
.I mktime
|
||||
function to attempt to divine whether summer time is in effect
|
||||
.B mktime
|
||||
function to attempt to divine whether daylight saving time is in effect
|
||||
for the specified time; in this case it does not use a consistent
|
||||
rule and may give a different answer when later
|
||||
presented with the same argument.)
|
||||
@ -131,22 +173,58 @@ is not set until
|
||||
and
|
||||
.B tm_year
|
||||
are determined.
|
||||
.I Mktime\^
|
||||
The
|
||||
.B mktime
|
||||
function
|
||||
returns the specified calendar time;
|
||||
If the calendar time cannot be represented,
|
||||
it returns
|
||||
.BR -1 .
|
||||
it returns \-1.
|
||||
.PP
|
||||
.I Difftime\^
|
||||
The
|
||||
.B difftime
|
||||
function
|
||||
returns the difference between two calendar times,
|
||||
.RI ( time1
|
||||
-
|
||||
\-
|
||||
.IR time0 ),
|
||||
expressed in seconds.
|
||||
.PP
|
||||
Declarations of all the functions and externals, and the ``tm'' structure,
|
||||
The
|
||||
.BR ctime_r ,
|
||||
.BR localtime_r ,
|
||||
.BR gmtime_r ,
|
||||
and
|
||||
.B asctime_r
|
||||
functions
|
||||
are like their unsuffixed counterparts, except that they accept an
|
||||
additional argument specifying where to store the result if successful.
|
||||
.PP
|
||||
The
|
||||
.B localtime_rz
|
||||
and
|
||||
.B mktime_z
|
||||
functions
|
||||
are like their unsuffixed counterparts, except that they accept an
|
||||
extra initial
|
||||
.B zone
|
||||
argument specifying the timezone to be used for conversion.
|
||||
If
|
||||
.B zone
|
||||
is null, UT is used; otherwise,
|
||||
.B zone
|
||||
should be have been allocated by
|
||||
.B tzalloc
|
||||
and should not be freed until after all uses (e.g., by calls to
|
||||
.BR strftime )
|
||||
of the filled-in
|
||||
.B tm_zone
|
||||
fields.
|
||||
.PP
|
||||
Declarations of all the functions and externals, and the
|
||||
.q "tm"
|
||||
structure,
|
||||
are in the
|
||||
.B <time.h>\^
|
||||
.B <time.h>
|
||||
header file.
|
||||
The structure (of type)
|
||||
.B struct tm
|
||||
@ -154,53 +232,64 @@ includes the following fields:
|
||||
.RS
|
||||
.PP
|
||||
.nf
|
||||
.ta .5i +\w'long tm_gmtoff;\0\0'u
|
||||
int tm_sec; /\(** seconds (0 - 60) \(**/
|
||||
int tm_min; /\(** minutes (0 - 59) \(**/
|
||||
int tm_hour; /\(** hours (0 - 23) \(**/
|
||||
int tm_mday; /\(** day of month (1 - 31) \(**/
|
||||
int tm_mon; /\(** month of year (0 - 11) \(**/
|
||||
.ta 2n +\w'long tm_gmtoff;nn'u
|
||||
int tm_sec; /\(** seconds (0\*(en60) \(**/
|
||||
int tm_min; /\(** minutes (0\*(en59) \(**/
|
||||
int tm_hour; /\(** hours (0\*(en23) \(**/
|
||||
int tm_mday; /\(** day of month (1\*(en31) \(**/
|
||||
int tm_mon; /\(** month of year (0\*(en11) \(**/
|
||||
int tm_year; /\(** year \- 1900 \(**/
|
||||
int tm_wday; /\(** day of week (Sunday = 0) \(**/
|
||||
int tm_yday; /\(** day of year (0 - 365) \(**/
|
||||
int tm_isdst; /\(** is summer time in effect? \(**/
|
||||
char \(**tm_zone; /\(** abbreviation of timezone name \(**/
|
||||
long tm_gmtoff; /\(** offset from UTC in seconds \(**/
|
||||
int tm_yday; /\(** day of year (0\*(en365) \(**/
|
||||
int tm_isdst; /\(** is daylight saving time in effect? \(**/
|
||||
char \(**tm_zone; /\(** time zone abbreviation (optional) \(**/
|
||||
long tm_gmtoff; /\(** offset from UT in seconds (optional) \(**/
|
||||
.fi
|
||||
.RE
|
||||
.PP
|
||||
The
|
||||
.I tm_zone
|
||||
.B tm_isdst
|
||||
field
|
||||
is non-zero if daylight saving time is in effect.
|
||||
.PP
|
||||
The
|
||||
.B tm_gmtoff
|
||||
field
|
||||
is the offset (in seconds) of the time represented
|
||||
from UT, with positive values indicating east
|
||||
of the Prime Meridian.
|
||||
The field's name is derived from Greenwich Mean Time, a precursor of UT.
|
||||
.PP
|
||||
In
|
||||
.B "struct tm"
|
||||
the
|
||||
.B tm_zone
|
||||
and
|
||||
.I tm_gmtoff
|
||||
.B tm_gmtoff
|
||||
fields exist, and are filled in, only if arrangements to do
|
||||
so were made when the library containing these functions was
|
||||
created.
|
||||
There is no guarantee that these fields will continue to exist
|
||||
in this form in future releases of this code.
|
||||
.PP
|
||||
.I Tm_isdst\^
|
||||
is non-zero if summer time is in effect.
|
||||
.PP
|
||||
.I Tm_gmtoff
|
||||
is the offset (in seconds) of the time represented
|
||||
from UTC, with positive values indicating east
|
||||
of the Prime Meridian.
|
||||
Similarly, the
|
||||
.B tzname
|
||||
variable is optional; also, there is no guarantee that
|
||||
.B tzname
|
||||
will
|
||||
continue to exist in this form in future releases of this code.
|
||||
.SH FILES
|
||||
.ta \w'/usr/local/etc/zoneinfo/posixrules\0\0'u
|
||||
/usr/local/etc/zoneinfo time zone information directory
|
||||
.ta \w'/usr/share/zoneinfo/posixrules\0\0'u
|
||||
/usr/share/zoneinfo timezone information directory
|
||||
.br
|
||||
/usr/local/etc/zoneinfo/localtime local time zone file
|
||||
/usr/share/zoneinfo/localtime local timezone file
|
||||
.br
|
||||
/usr/local/etc/zoneinfo/posixrules used with POSIX-style TZ's
|
||||
/usr/share/zoneinfo/posixrules used with POSIX-style TZ's
|
||||
.br
|
||||
/usr/local/etc/zoneinfo/GMT for UTC leap seconds
|
||||
/usr/share/zoneinfo/GMT for UTC leap seconds
|
||||
.sp
|
||||
If
|
||||
.B /usr/local/etc/zoneinfo/GMT
|
||||
.B /usr/share/zoneinfo/GMT
|
||||
is absent,
|
||||
UTC leap seconds are loaded from
|
||||
.BR /usr/local/etc/zoneinfo/posixrules .
|
||||
.BR /usr/share/zoneinfo/posixrules .
|
||||
.SH SEE ALSO
|
||||
getenv(3),
|
||||
newstrftime(3),
|
||||
@ -208,34 +297,48 @@ newtzset(3),
|
||||
time(2),
|
||||
tzfile(5)
|
||||
.SH NOTES
|
||||
The return values point to static data;
|
||||
the data is overwritten by each call.
|
||||
The return values of
|
||||
.BR asctime ,
|
||||
.BR ctime ,
|
||||
.BR gmtime ,
|
||||
and
|
||||
.B localtime
|
||||
point to static data
|
||||
overwritten by each call.
|
||||
The
|
||||
.B tzname
|
||||
variable (once set) and the
|
||||
.B tm_zone
|
||||
field of a returned
|
||||
.B "struct tm"
|
||||
points to a static array of characters, which
|
||||
will also be overwritten at the next call
|
||||
(and by calls to
|
||||
.IR tzset ).
|
||||
.PP
|
||||
.I Asctime\^
|
||||
both point to an array of characters that
|
||||
can be freed or overwritten by later calls to the functions
|
||||
.BR localtime ,
|
||||
.BR tzfree ,
|
||||
and
|
||||
.I ctime\^
|
||||
.BR tzset ,
|
||||
if these functions affect the timezone information that specifies the
|
||||
abbreviation in question.
|
||||
The remaining functions and data are thread-safe.
|
||||
.PP
|
||||
The
|
||||
.BR asctime ,
|
||||
.BR asctime_r ,
|
||||
.BR ctime ,
|
||||
and
|
||||
.B ctime_r
|
||||
functions
|
||||
behave strangely for years before 1000 or after 9999.
|
||||
The 1989 and 1999 editions of the C Standard say
|
||||
that years from \-99 through 999 are converted without
|
||||
extra spaces, but this conflicts with longstanding
|
||||
tradition and with this implementation.
|
||||
The 2011 edition says that the behavior
|
||||
is undefined if the year is before 1000 or after 9999.
|
||||
Traditional implementations of these two functions are
|
||||
restricted to years in the range 1900 through 2099.
|
||||
To avoid this portability mess, new programs should use
|
||||
.I strftime\^
|
||||
.B strftime
|
||||
instead.
|
||||
.PP
|
||||
Avoid using out-of-range values with
|
||||
.I mktime
|
||||
when setting up lunch with promptness sticklers in Riyadh.
|
||||
.\" @(#)newctime.3 8.3
|
||||
.\" This file is in the public domain, so clarified as of
|
||||
.\" 2009-05-17 by Arthur David Olson.
|
||||
|
253
newctime.3.txt
253
newctime.3.txt
@ -1,149 +1,172 @@
|
||||
NAME
|
||||
NEWCTIME(3) Library Functions Manual NEWCTIME(3)
|
||||
|
||||
asctime, ctime, difftime, gmtime, localtime, mktime -
|
||||
convert date and time to ASCII
|
||||
NAME
|
||||
asctime, ctime, difftime, gmtime, localtime, mktime - convert date and
|
||||
time
|
||||
|
||||
SYNOPSIS
|
||||
extern char *tzname[2];
|
||||
#include <time.h>
|
||||
|
||||
void tzset()
|
||||
extern char *tzname[]; /* (optional) */
|
||||
|
||||
#include <sys/types.h>
|
||||
char *ctime(time_t const *clock);
|
||||
|
||||
char *ctime(clock)
|
||||
const time_t *clock;
|
||||
char *ctime_r(time_t const *clock, char *buf);
|
||||
|
||||
double difftime(time1, time0)
|
||||
time_t time1;
|
||||
time_t time0;
|
||||
double difftime(time_t time1, time_t time0);
|
||||
|
||||
#include <time.h>
|
||||
char *asctime(struct tm const *tm);
|
||||
|
||||
char *asctime(tm)
|
||||
const struct tm *tm;
|
||||
char *asctime_r(struct tm const *restrict tm,
|
||||
char *restrict result);
|
||||
|
||||
struct tm *localtime(clock)
|
||||
const time_t *clock;
|
||||
struct tm *localtime(time_t const *clock);
|
||||
|
||||
struct tm *gmtime(clock)
|
||||
const time_t *clock;
|
||||
struct tm *localtime_r(time_t const *restrict clock,
|
||||
struct tm *restrict result);
|
||||
|
||||
time_t mktime(tm)
|
||||
struct tm *tm;
|
||||
struct tm *localtime_rz(timezone_t restrict zone,
|
||||
time_t const *restrict clock,
|
||||
struct tm *restrict result);
|
||||
|
||||
cc ... -ltz
|
||||
struct tm *gmtime(time_t const *clock);
|
||||
|
||||
struct tm *gmtime_r(time_t const *restrict clock,
|
||||
struct tm *restrict result);
|
||||
|
||||
time_t mktime(struct tm *tm);
|
||||
|
||||
time_t mktime_z(timezone_t restrict zone,
|
||||
struct tm *restrict tm);
|
||||
|
||||
cc ... -ltz
|
||||
|
||||
DESCRIPTION
|
||||
Ctime converts a long integer, pointed to by clock,
|
||||
representing the time in seconds since 00:00:00 UTC,
|
||||
1970-01-01, and returns a pointer to a string of the form
|
||||
Thu Nov 24 18:22:48 1986\n\0
|
||||
Years requiring fewer than four characters are padded with
|
||||
leading zeroes. For years longer than four characters, the
|
||||
string is of the form
|
||||
Thu Nov 24 18:22:48 81986\n\0
|
||||
with five spaces before the year. These unusual formats are
|
||||
designed to make it less likely that older software that
|
||||
expects exactly 26 bytes of output will mistakenly output
|
||||
misleading values for out-of-range years.
|
||||
The ctime function converts a long integer, pointed to by clock, and
|
||||
returns a pointer to a string of the form
|
||||
Thu Nov 24 18:22:48 1986\n\0
|
||||
Years requiring fewer than four characters are padded with leading
|
||||
zeroes. For years longer than four characters, the string is of the
|
||||
form
|
||||
Thu Nov 24 18:22:48 81986\n\0
|
||||
with five spaces before the year. These unusual formats are designed
|
||||
to make it less likely that older software that expects exactly 26
|
||||
bytes of output will mistakenly output misleading values for out-of-
|
||||
range years.
|
||||
|
||||
Localtime and gmtime return pointers to ``tm'' structures,
|
||||
described below. Localtime corrects for the time zone and
|
||||
any time zone adjustments (such as Daylight Saving Time in
|
||||
the United States). After filling in the ``tm'' structure,
|
||||
localtime sets the tm_isdst'th element of tzname to a
|
||||
pointer to an ASCII string that's the time zone abbreviation
|
||||
to be used with localtime's return value.
|
||||
The *clock timestamp represents the time in seconds since 1970-01-01
|
||||
00:00:00 Coordinated Universal Time (UTC). The POSIX standard says
|
||||
that timestamps must be nonnegative and must ignore leap seconds. Many
|
||||
implementations extend POSIX by allowing negative timestamps, and can
|
||||
therefore represent timestamps that predate the introduction of UTC and
|
||||
are some other flavor of Universal Time (UT). Some implementations
|
||||
support leap seconds, in contradiction to POSIX.
|
||||
|
||||
Gmtime converts to Coordinated Universal Time.
|
||||
The localtime and gmtime functions return pointers to "tm" structures,
|
||||
described below. The localtime function corrects for the time zone and
|
||||
any time zone adjustments (such as Daylight Saving Time in the United
|
||||
States). After filling in the "tm" structure, localtime sets the
|
||||
tm_isdst'th element of tzname to a pointer to a string that's the time
|
||||
zone abbreviation to be used with localtime's return value.
|
||||
|
||||
Asctime converts a time value contained in a ``tm''
|
||||
structure to a string, as shown in the above example, and
|
||||
returns a pointer to the string.
|
||||
The gmtime function converts to Coordinated Universal Time.
|
||||
|
||||
Mktime converts the broken-down time, expressed as local
|
||||
time, in the structure pointed to by tm into a calendar time
|
||||
value with the same encoding as that of the values returned
|
||||
by the time function. The original values of the tm_wday
|
||||
and tm_yday components of the structure are ignored, and the
|
||||
original values of the other components are not restricted
|
||||
to their normal ranges. (A positive or zero value for
|
||||
tm_isdst causes mktime to presume initially that summer time
|
||||
(for example, Daylight Saving Time in the U.S.A.)
|
||||
respectively, is or is not in effect for the specified time.
|
||||
A negative value for tm_isdst causes the mktime function to
|
||||
attempt to divine whether summer time is in effect for the
|
||||
specified time; in this case it does not use a consistent
|
||||
rule and may give a different answer when later presented
|
||||
with the same argument.) On successful completion, the
|
||||
values of the tm_wday and tm_yday components of the
|
||||
structure are set appropriately, and the other components
|
||||
are set to represent the specified calendar time, but with
|
||||
their values forced to their normal ranges; the final value
|
||||
of tm_mday is not set until tm_mon and tm_year are
|
||||
determined. Mktime returns the specified calendar time; If
|
||||
the calendar time cannot be represented, it returns -1.
|
||||
The asctime function converts a time value contained in a "tm"
|
||||
structure to a string, as shown in the above example, and returns a
|
||||
pointer to the string.
|
||||
|
||||
Difftime returns the difference between two calendar times,
|
||||
(time1 - time0), expressed in seconds.
|
||||
The mktime function converts the broken-down time, expressed as local
|
||||
time, in the structure pointed to by tm into a calendar time value with
|
||||
the same encoding as that of the values returned by the time function.
|
||||
The original values of the tm_wday and tm_yday components of the
|
||||
structure are ignored, and the original values of the other components
|
||||
are not restricted to their normal ranges. (A positive or zero value
|
||||
for tm_isdst causes mktime to presume initially that daylight saving
|
||||
time respectively, is or is not in effect for the specified time. A
|
||||
negative value for tm_isdst causes the mktime function to attempt to
|
||||
divine whether daylight saving time is in effect for the specified
|
||||
time; in this case it does not use a consistent rule and may give a
|
||||
different answer when later presented with the same argument.) On
|
||||
successful completion, the values of the tm_wday and tm_yday components
|
||||
of the structure are set appropriately, and the other components are
|
||||
set to represent the specified calendar time, but with their values
|
||||
forced to their normal ranges; the final value of tm_mday is not set
|
||||
until tm_mon and tm_year are determined. The mktime function returns
|
||||
the specified calendar time; If the calendar time cannot be
|
||||
represented, it returns -1.
|
||||
|
||||
Declarations of all the functions and externals, and the
|
||||
``tm'' structure, are in the <time.h> header file. The
|
||||
structure (of type) struct tm includes the following fields:
|
||||
The difftime function returns the difference between two calendar
|
||||
times, (time1 - time0), expressed in seconds.
|
||||
|
||||
int tm_sec; /* seconds (0 - 60) */
|
||||
int tm_min; /* minutes (0 - 59) */
|
||||
int tm_hour; /* hours (0 - 23) */
|
||||
int tm_mday; /* day of month (1 - 31) */
|
||||
int tm_mon; /* month of year (0 - 11) */
|
||||
int tm_year; /* year - 1900 */
|
||||
int tm_wday; /* day of week (Sunday = 0) */
|
||||
int tm_yday; /* day of year (0 - 365) */
|
||||
int tm_isdst; /* is summer time in effect? */
|
||||
char *tm_zone; /* abbreviation of timezone name */
|
||||
long tm_gmtoff; /* offset from UTC in seconds */
|
||||
The ctime_r, localtime_r, gmtime_r, and asctime_r functions are like
|
||||
their unsuffixed counterparts, except that they accept an additional
|
||||
argument specifying where to store the result if successful.
|
||||
|
||||
The tm_zone and tm_gmtoff fields exist, and are filled in,
|
||||
only if arrangements to do so were made when the library
|
||||
containing these functions was created. There is no
|
||||
guarantee that these fields will continue to exist in this
|
||||
form in future releases of this code.
|
||||
The localtime_rz and mktime_z functions are like their unsuffixed
|
||||
counterparts, except that they accept an extra initial zone argument
|
||||
specifying the timezone to be used for conversion. If zone is null, UT
|
||||
is used; otherwise, zone should be have been allocated by tzalloc and
|
||||
should not be freed until after all uses (e.g., by calls to strftime)
|
||||
of the filled-in tm_zone fields.
|
||||
|
||||
Tm_isdst is non-zero if summer time is in effect.
|
||||
Declarations of all the functions and externals, and the "tm"
|
||||
structure, are in the <time.h> header file. The structure (of type)
|
||||
struct tm includes the following fields:
|
||||
|
||||
Tm_gmtoff is the offset (in seconds) of the time represented
|
||||
from UTC, with positive values indicating east of the Prime
|
||||
Meridian.
|
||||
int tm_sec; /* seconds (0-60) */
|
||||
int tm_min; /* minutes (0-59) */
|
||||
int tm_hour; /* hours (0-23) */
|
||||
int tm_mday; /* day of month (1-31) */
|
||||
int tm_mon; /* month of year (0-11) */
|
||||
int tm_year; /* year - 1900 */
|
||||
int tm_wday; /* day of week (Sunday = 0) */
|
||||
int tm_yday; /* day of year (0-365) */
|
||||
int tm_isdst; /* is daylight saving time in effect? */
|
||||
char *tm_zone; /* time zone abbreviation (optional) */
|
||||
long tm_gmtoff; /* offset from UT in seconds (optional) */
|
||||
|
||||
The tm_isdst field is non-zero if daylight saving time is in effect.
|
||||
|
||||
The tm_gmtoff field is the offset (in seconds) of the time represented
|
||||
from UT, with positive values indicating east of the Prime Meridian.
|
||||
The field's name is derived from Greenwich Mean Time, a precursor of
|
||||
UT.
|
||||
|
||||
In struct tm the tm_zone and tm_gmtoff fields exist, and are filled in,
|
||||
only if arrangements to do so were made when the library containing
|
||||
these functions was created. Similarly, the tzname variable is
|
||||
optional; also, there is no guarantee that tzname will continue to
|
||||
exist in this form in future releases of this code.
|
||||
|
||||
FILES
|
||||
/usr/local/etc/zoneinfo time zone information
|
||||
directory
|
||||
/usr/local/etc/zoneinfo/localtime local time zone file
|
||||
/usr/local/etc/zoneinfo/posixrules used with POSIX-style
|
||||
TZ's
|
||||
/usr/local/etc/zoneinfo/GMT for UTC leap seconds
|
||||
/usr/share/zoneinfo timezone information directory
|
||||
/usr/share/zoneinfo/localtime local timezone file
|
||||
/usr/share/zoneinfo/posixrules used with POSIX-style TZ's
|
||||
/usr/share/zoneinfo/GMT for UTC leap seconds
|
||||
|
||||
If /usr/local/etc/zoneinfo/GMT is absent, UTC leap seconds
|
||||
are loaded from /usr/local/etc/zoneinfo/posixrules.
|
||||
If /usr/share/zoneinfo/GMT is absent, UTC leap seconds are loaded from
|
||||
/usr/share/zoneinfo/posixrules.
|
||||
|
||||
SEE ALSO
|
||||
getenv(3), newstrftime(3), newtzset(3), time(2), tzfile(5)
|
||||
getenv(3), newstrftime(3), newtzset(3), time(2), tzfile(5)
|
||||
|
||||
NOTES
|
||||
The return values point to static data; the data is
|
||||
overwritten by each call. The tm_zone field of a returned
|
||||
struct tm points to a static array of characters, which will
|
||||
also be overwritten at the next call (and by calls to
|
||||
tzset).
|
||||
The return values of asctime, ctime, gmtime, and localtime point to
|
||||
static data overwritten by each call. The tzname variable (once set)
|
||||
and the tm_zone field of a returned struct tm both point to an array of
|
||||
characters that can be freed or overwritten by later calls to the
|
||||
functions localtime, tzfree, and tzset, if these functions affect the
|
||||
timezone information that specifies the abbreviation in question. The
|
||||
remaining functions and data are thread-safe.
|
||||
|
||||
Asctime and ctime behave strangely for years before 1000 or
|
||||
after 9999. The 1989 and 1999 editions of the C Standard
|
||||
say that years from -99 through 999 are converted without
|
||||
extra spaces, but this conflicts with longstanding tradition
|
||||
and with this implementation. Traditional implementations
|
||||
of these two functions are restricted to years in the range
|
||||
1900 through 2099. To avoid this portability mess, new
|
||||
programs should use strftime instead.
|
||||
The asctime, asctime_r, ctime, and ctime_r functions behave strangely
|
||||
for years before 1000 or after 9999. The 1989 and 1999 editions of the
|
||||
C Standard say that years from -99 through 999 are converted without
|
||||
extra spaces, but this conflicts with longstanding tradition and with
|
||||
this implementation. The 2011 edition says that the behavior is
|
||||
undefined if the year is before 1000 or after 9999. Traditional
|
||||
implementations of these two functions are restricted to years in the
|
||||
range 1900 through 2099. To avoid this portability mess, new programs
|
||||
should use strftime instead.
|
||||
|
||||
Avoid using out-of-range values with mktime when setting up
|
||||
lunch with promptness sticklers in Riyadh.
|
||||
NEWCTIME(3)
|
||||
|
182
newstrftime.3
182
newstrftime.3
@ -1,5 +1,7 @@
|
||||
.\" Based on the UCB file whose copyright information appears below.
|
||||
.\" Copyright (c) 1989, 1991 The Regents of the University of California.
|
||||
.\" strftime man page
|
||||
.\"
|
||||
.\" Based on the UCB file whose corrected copyright information appears below.
|
||||
.\" Copyright 1989, 1991 The Regents of the University of California.
|
||||
.\" All rights reserved.
|
||||
.\"
|
||||
.\" This code is derived from software contributed to Berkeley by
|
||||
@ -14,15 +16,11 @@
|
||||
.\" 2. Redistributions in binary form must reproduce the above copyright
|
||||
.\" notice, this list of conditions and the following disclaimer in the
|
||||
.\" documentation and/or other materials provided with the distribution.
|
||||
.\" 3. All advertising materials mentioning features or use of this software
|
||||
.\" must display the following acknowledgement:
|
||||
.\" This product includes software developed by the University of
|
||||
.\" California, Berkeley and its contributors.
|
||||
.\" 4. Neither the name of the University nor the names of its contributors
|
||||
.\" 3. Neither the name of the University nor the names of its contributors
|
||||
.\" may be used to endorse or promote products derived from this software
|
||||
.\" without specific prior written permission.
|
||||
.\"
|
||||
.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
|
||||
.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS" AND
|
||||
.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
|
||||
@ -42,49 +40,51 @@
|
||||
strftime \- format date and time
|
||||
.SH SYNOPSIS
|
||||
.nf
|
||||
.B #include <sys/types.h>
|
||||
.ie \n(.g .ds - \f(CW-\fP
|
||||
.el .ds - \-
|
||||
.B #include <time.h>
|
||||
.PP
|
||||
.B size_t strftime(buf, maxsize, format, timeptr)
|
||||
.B char *buf;
|
||||
.B size_t maxsize;
|
||||
.B const char *format;
|
||||
.B const struct tm *timeptr
|
||||
.B "size_t strftime(char *restrict buf, size_t maxsize,"
|
||||
.B " char const *restrict format, struct tm const *restrict timeptr);"
|
||||
.PP
|
||||
.B cc ... -ltz
|
||||
.B cc ... \-ltz
|
||||
.fi
|
||||
.SH DESCRIPTION
|
||||
.ie '\(lq'' .ds lq \&"\"
|
||||
.el .ds lq \(lq\"
|
||||
.ie '\(rq'' .ds rq \&"\"
|
||||
.el .ds rq \(rq\"
|
||||
.de c
|
||||
.ie \n(.g \f(CW\\$1\fP\\$2
|
||||
.el \\$1\\$2
|
||||
..
|
||||
.de q
|
||||
\\$3\*(lq\\$1\*(rq\\$2
|
||||
..
|
||||
The
|
||||
.I strftime\^
|
||||
.B strftime
|
||||
function formats the information from
|
||||
.I timeptr\^
|
||||
into the buffer
|
||||
.I buf\^
|
||||
.I timeptr
|
||||
into the array pointed to by
|
||||
.I buf
|
||||
according to the string pointed to by
|
||||
.IR format\^ .
|
||||
.IR format .
|
||||
.PP
|
||||
The
|
||||
.I format\^
|
||||
.I format
|
||||
string consists of zero or more conversion specifications and
|
||||
ordinary characters.
|
||||
All ordinary characters are copied directly into the buffer.
|
||||
All ordinary characters are copied directly into the array.
|
||||
A conversion specification consists of a percent sign
|
||||
.Ql %
|
||||
and one other character.
|
||||
.PP
|
||||
No more than
|
||||
.I maxsize\^
|
||||
characters are be placed into the array.
|
||||
If the total number of resulting characters, including the terminating
|
||||
null character, is not more than
|
||||
.IR maxsize\^ ,
|
||||
.I strftime\^
|
||||
returns the number of characters in the array, not counting the
|
||||
terminating null.
|
||||
Otherwise, zero is returned.
|
||||
.I maxsize
|
||||
bytes are placed into the array.
|
||||
.PP
|
||||
Each conversion specification is replaced by the characters as
|
||||
follows which are then copied into the buffer.
|
||||
follows which are then copied into the array.
|
||||
.TP
|
||||
%A
|
||||
is replaced by the locale's full weekday name.
|
||||
@ -100,99 +100,122 @@ is replaced by the locale's abbreviated month name.
|
||||
.TP
|
||||
%C
|
||||
is replaced by the century (a year divided by 100 and truncated to an integer)
|
||||
as a decimal number (00-99).
|
||||
as a decimal number [00,99].
|
||||
.TP
|
||||
%c
|
||||
is replaced by the locale's appropriate date and time representation.
|
||||
.TP
|
||||
%D
|
||||
is replaced by the date in the format %m/%d/%y.
|
||||
is equivalent to
|
||||
.c %m/%d/%y .
|
||||
.TP
|
||||
%d
|
||||
is replaced by the day of the month as a decimal number (01-31).
|
||||
is replaced by the day of the month as a decimal number [01,31].
|
||||
.TP
|
||||
%e
|
||||
is replaced by the day of month as a decimal number (1-31);
|
||||
is replaced by the day of month as a decimal number [1,31];
|
||||
single digits are preceded by a blank.
|
||||
.TP
|
||||
%F
|
||||
is replaced by the date in the format %Y-%m-%d.
|
||||
is equivalent to
|
||||
.c %Y-%m-%d
|
||||
(the ISO 8601 date format).
|
||||
.TP
|
||||
%G
|
||||
is replaced by the ISO 8601 year with century as a decimal number.
|
||||
See also the
|
||||
.c %V
|
||||
conversion specification.
|
||||
.TP
|
||||
%g
|
||||
is replaced by the ISO 8601 year without century as a decimal number (00-99).
|
||||
is replaced by the ISO 8601 year without century as a decimal number [00,99].
|
||||
This is the year that includes the greater part of the week.
|
||||
(Monday as the first day of a week).
|
||||
See also the
|
||||
.c %V
|
||||
conversion specification.
|
||||
.TP
|
||||
%H
|
||||
is replaced by the hour (24-hour clock) as a decimal number (00-23).
|
||||
is replaced by the hour (24-hour clock) as a decimal number [00,23].
|
||||
.TP
|
||||
%I
|
||||
is replaced by the hour (12-hour clock) as a decimal number (01-12).
|
||||
is replaced by the hour (12-hour clock) as a decimal number [01,12].
|
||||
.TP
|
||||
%j
|
||||
is replaced by the day of the year as a decimal number (001-366).
|
||||
is replaced by the day of the year as a decimal number [001,366].
|
||||
.TP
|
||||
%k
|
||||
is replaced by the hour (24-hour clock) as a decimal number (0-23);
|
||||
is replaced by the hour (24-hour clock) as a decimal number [0,23];
|
||||
single digits are preceded by a blank.
|
||||
.TP
|
||||
%l
|
||||
is replaced by the hour (12-hour clock) as a decimal number (1-12);
|
||||
is replaced by the hour (12-hour clock) as a decimal number [1,12];
|
||||
single digits are preceded by a blank.
|
||||
.TP
|
||||
%M
|
||||
is replaced by the minute as a decimal number (00-59).
|
||||
is replaced by the minute as a decimal number [00,59].
|
||||
.TP
|
||||
%m
|
||||
is replaced by the month as a decimal number (01-12).
|
||||
is replaced by the month as a decimal number [01,12].
|
||||
.TP
|
||||
%n
|
||||
is replaced by a newline.
|
||||
.TP
|
||||
%p
|
||||
is replaced by the locale's equivalent of either AM or PM.
|
||||
is replaced by the locale's equivalent of either
|
||||
.q AM
|
||||
or
|
||||
.q PM .
|
||||
.TP
|
||||
%R
|
||||
is replaced by the time in the format %H:%M.
|
||||
is replaced by the time in the format
|
||||
.c %H:%M .
|
||||
.TP
|
||||
%r
|
||||
is replaced by the locale's representation of 12-hour clock time
|
||||
using AM/PM notation.
|
||||
.TP
|
||||
%S
|
||||
is replaced by the second as a decimal number (00-60).
|
||||
is replaced by the second as a decimal number [00,60].
|
||||
The range of
|
||||
seconds is [00,60] instead of [00,59] to allow for the periodic occurrence
|
||||
of leap seconds.
|
||||
.TP
|
||||
%s
|
||||
is replaced by the number of seconds since the Epoch, UTC (see mktime(3)).
|
||||
is replaced by the number of seconds since the Epoch (see
|
||||
.BR ctime (3)).
|
||||
.TP
|
||||
%T
|
||||
is replaced by the time in the format %H:%M:%S.
|
||||
is replaced by the time in the format
|
||||
.c %H:%M:%S .
|
||||
.TP
|
||||
%t
|
||||
is replaced by a tab.
|
||||
.TP
|
||||
%U
|
||||
is replaced by the week number of the year (Sunday as the first day of
|
||||
the week) as a decimal number (00-53).
|
||||
the week) as a decimal number [00,53].
|
||||
.TP
|
||||
%u
|
||||
is replaced by the weekday (Monday as the first day of the week)
|
||||
as a decimal number (1-7).
|
||||
as a decimal number [1,7].
|
||||
.TP
|
||||
%V
|
||||
is replaced by the week number of the year (Monday as the first day of
|
||||
the week) as a decimal number (01-53). If the week containing January
|
||||
the week) as a decimal number [01,53]. If the week containing January
|
||||
1 has four or more days in the new year, then it is week 1; otherwise
|
||||
it is week 53 of the previous year, and the next week is week 1.
|
||||
The year is given by the
|
||||
.c %G
|
||||
conversion specification.
|
||||
.TP
|
||||
%W
|
||||
is replaced by the week number of the year (Monday as the first day of
|
||||
the week) as a decimal number (00-53).
|
||||
the week) as a decimal number [00,53].
|
||||
.TP
|
||||
%w
|
||||
is replaced by the weekday (Sunday as the first day of the week)
|
||||
as a decimal number (0-6).
|
||||
as a decimal number [0,6].
|
||||
.TP
|
||||
%X
|
||||
is replaced by the locale's appropriate time representation.
|
||||
@ -204,22 +227,58 @@ is replaced by the locale's appropriate date representation.
|
||||
is replaced by the year with century as a decimal number.
|
||||
.TP
|
||||
%y
|
||||
is replaced by the year without century as a decimal number (00-99).
|
||||
is replaced by the year without century as a decimal number [00,99].
|
||||
.TP
|
||||
%Z
|
||||
is replaced by the time zone name,
|
||||
is replaced by the time zone abbreviation,
|
||||
or by the empty string if this is not determinable.
|
||||
.TP
|
||||
%z
|
||||
is replaced by the offset from UTC in the format +HHMM or -HHMM as appropriate,
|
||||
is replaced by the offset from the Prime Meridian
|
||||
in the format +HHMM or \*-HHMM (ISO 8601) as appropriate,
|
||||
with positive values representing locations east of Greenwich,
|
||||
or by the empty string if this is not determinable.
|
||||
The numeric time zone abbreviation \*-0000 is used when the time is
|
||||
Universal Time
|
||||
but local time is indeterminate; by convention this is used for
|
||||
locations while uninhabited, and corresponds to a zero offset when the
|
||||
time zone abbreviation begins with
|
||||
.q "\*-" .
|
||||
.TP
|
||||
%%
|
||||
is replaced by a single %.
|
||||
.TP
|
||||
%+
|
||||
is replaced by the date and time in date(1) format.
|
||||
is replaced by the locale's date and time in
|
||||
.BR date (1)
|
||||
format.
|
||||
.SH "RETURN VALUE"
|
||||
If the conversion is successful,
|
||||
.B strftime
|
||||
returns the number of bytes placed into the array, not counting the
|
||||
terminating NUL;
|
||||
.B errno
|
||||
is unchanged if the returned value is zero.
|
||||
Otherwise,
|
||||
.B errno
|
||||
is set to indicate the error, zero is returned,
|
||||
and the array contents are unspecified.
|
||||
.SH ERRORS
|
||||
This function fails if:
|
||||
.TP
|
||||
[ERANGE]
|
||||
The total number of resulting bytes, including the terminating
|
||||
NUL character, is more than
|
||||
.IR maxsize .
|
||||
.PP
|
||||
This function may fail if:
|
||||
.TP
|
||||
[EOVERFLOW]
|
||||
The format includes an
|
||||
.c %s
|
||||
conversion and the number of seconds since the Epoch cannot be represented
|
||||
in a
|
||||
.c time_t .
|
||||
.SH SEE ALSO
|
||||
date(1),
|
||||
getenv(3),
|
||||
@ -227,6 +286,5 @@ newctime(3),
|
||||
newtzset(3),
|
||||
time(2),
|
||||
tzfile(5)
|
||||
.\" @(#)newstrftime.3 8.2
|
||||
.\" This file is in the public domain, so clarified as of
|
||||
.\" 2009-05-17 by Arthur David Olson.
|
||||
.SH BUGS
|
||||
There is no conversion specification for the phase of the moon.
|
||||
|
@ -1,149 +1,169 @@
|
||||
NAME
|
||||
NEWSTRFTIME(3) Library Functions Manual NEWSTRFTIME(3)
|
||||
|
||||
strftime - format date and time
|
||||
NAME
|
||||
strftime - format date and time
|
||||
|
||||
SYNOPSIS
|
||||
#include <sys/types.h>
|
||||
#include <time.h>
|
||||
#include <time.h>
|
||||
|
||||
size_t strftime(buf, maxsize, format, timeptr)
|
||||
char *buf;
|
||||
size_t maxsize;
|
||||
const char *format;
|
||||
const struct tm *timeptr
|
||||
size_t strftime(char *restrict buf, size_t maxsize,
|
||||
char const *restrict format, struct tm const *restrict timeptr);
|
||||
|
||||
cc ... -ltz
|
||||
cc ... -ltz
|
||||
|
||||
DESCRIPTION
|
||||
The strftime function formats the information from timeptr
|
||||
into the buffer buf according to the string pointed to by
|
||||
format.
|
||||
The strftime function formats the information from timeptr into the
|
||||
array pointed to by buf according to the string pointed to by format.
|
||||
|
||||
The format string consists of zero or more conversion
|
||||
specifications and ordinary characters. All ordinary
|
||||
characters are copied directly into the buffer. A
|
||||
conversion specification consists of a percent sign and one
|
||||
other character.
|
||||
The format string consists of zero or more conversion specifications
|
||||
and ordinary characters. All ordinary characters are copied directly
|
||||
into the array. A conversion specification consists of a percent sign
|
||||
and one other character.
|
||||
|
||||
No more than maxsize characters are be placed into the
|
||||
array. If the total number of resulting characters,
|
||||
including the terminating null character, is not more than
|
||||
maxsize, strftime returns the number of characters in the
|
||||
array, not counting the terminating null. Otherwise, zero
|
||||
is returned.
|
||||
No more than maxsize bytes are placed into the array.
|
||||
|
||||
Each conversion specification is replaced by the characters
|
||||
as follows which are then copied into the buffer.
|
||||
Each conversion specification is replaced by the characters as follows
|
||||
which are then copied into the array.
|
||||
|
||||
%A is replaced by the locale's full weekday name.
|
||||
%A is replaced by the locale's full weekday name.
|
||||
|
||||
%a is replaced by the locale's abbreviated weekday name.
|
||||
%a is replaced by the locale's abbreviated weekday name.
|
||||
|
||||
%B is replaced by the locale's full month name.
|
||||
%B is replaced by the locale's full month name.
|
||||
|
||||
%b or %h
|
||||
is replaced by the locale's abbreviated month name.
|
||||
%b or %h
|
||||
is replaced by the locale's abbreviated month name.
|
||||
|
||||
%C is replaced by the century (a year divided by 100 and
|
||||
truncated to an integer) as a decimal number (00-99).
|
||||
%C is replaced by the century (a year divided by 100 and truncated
|
||||
to an integer) as a decimal number [00,99].
|
||||
|
||||
%c is replaced by the locale's appropriate date and time
|
||||
representation.
|
||||
%c is replaced by the locale's appropriate date and time
|
||||
representation.
|
||||
|
||||
%D is replaced by the date in the format %m/%d/%y.
|
||||
%D is equivalent to %m/%d/%y.
|
||||
|
||||
%d is replaced by the day of the month as a decimal number
|
||||
(01-31).
|
||||
%d is replaced by the day of the month as a decimal number [01,31].
|
||||
|
||||
%e is replaced by the day of month as a decimal number
|
||||
(1-31); single digits are preceded by a blank.
|
||||
%F is replaced by the date in the format %Y-%m-%d.
|
||||
%e is replaced by the day of month as a decimal number [1,31];
|
||||
single digits are preceded by a blank.
|
||||
|
||||
%G is replaced by the ISO 8601 year with century as a
|
||||
decimal number.
|
||||
%F is equivalent to %Y-%m-%d (the ISO 8601 date format).
|
||||
|
||||
%g is replaced by the ISO 8601 year without century as a
|
||||
decimal number (00-99).
|
||||
%H is replaced by the hour (24-hour clock) as a decimal
|
||||
number (00-23).
|
||||
%G is replaced by the ISO 8601 year with century as a decimal
|
||||
number. See also the %V conversion specification.
|
||||
|
||||
%I is replaced by the hour (12-hour clock) as a decimal
|
||||
number (01-12).
|
||||
%g is replaced by the ISO 8601 year without century as a decimal
|
||||
number [00,99]. This is the year that includes the greater part
|
||||
of the week. (Monday as the first day of a week). See also the
|
||||
%V conversion specification.
|
||||
|
||||
%j is replaced by the day of the year as a decimal number
|
||||
(001-366).
|
||||
%H is replaced by the hour (24-hour clock) as a decimal number
|
||||
[00,23].
|
||||
|
||||
%k is replaced by the hour (24-hour clock) as a decimal
|
||||
number (0-23); single digits are preceded by a blank.
|
||||
%I is replaced by the hour (12-hour clock) as a decimal number
|
||||
[01,12].
|
||||
|
||||
%l is replaced by the hour (12-hour clock) as a decimal
|
||||
number (1-12); single digits are preceded by a blank.
|
||||
%j is replaced by the day of the year as a decimal number
|
||||
[001,366].
|
||||
|
||||
%M is replaced by the minute as a decimal number (00-59).
|
||||
%k is replaced by the hour (24-hour clock) as a decimal number
|
||||
[0,23]; single digits are preceded by a blank.
|
||||
|
||||
%m is replaced by the month as a decimal number (01-12).
|
||||
%l is replaced by the hour (12-hour clock) as a decimal number
|
||||
[1,12]; single digits are preceded by a blank.
|
||||
|
||||
%n is replaced by a newline.
|
||||
%M is replaced by the minute as a decimal number [00,59].
|
||||
|
||||
%p is replaced by the locale's equivalent of either AM or
|
||||
PM.
|
||||
%m is replaced by the month as a decimal number [01,12].
|
||||
|
||||
%R is replaced by the time in the format %H:%M.
|
||||
%n is replaced by a newline.
|
||||
|
||||
%r is replaced by the locale's representation of 12-hour
|
||||
clock time using AM/PM notation.
|
||||
%p is replaced by the locale's equivalent of either "AM" or "PM".
|
||||
|
||||
%S is replaced by the second as a decimal number (00-60).
|
||||
%R is replaced by the time in the format %H:%M.
|
||||
|
||||
%s is replaced by the number of seconds since the Epoch,
|
||||
UTC (see mktime(3)).
|
||||
%r is replaced by the locale's representation of 12-hour clock time
|
||||
using AM/PM notation.
|
||||
|
||||
%T is replaced by the time in the format %H:%M:%S.
|
||||
%S is replaced by the second as a decimal number [00,60]. The
|
||||
range of seconds is [00,60] instead of [00,59] to allow for the
|
||||
periodic occurrence of leap seconds.
|
||||
|
||||
%t is replaced by a tab.
|
||||
%s is replaced by the number of seconds since the Epoch (see
|
||||
ctime(3)).
|
||||
|
||||
%U is replaced by the week number of the year (Sunday as
|
||||
the first day of the week) as a decimal number (00-53).
|
||||
%T is replaced by the time in the format %H:%M:%S.
|
||||
|
||||
%u is replaced by the weekday (Monday as the first day of
|
||||
the week) as a decimal number (1-7).
|
||||
%t is replaced by a tab.
|
||||
|
||||
%V is replaced by the week number of the year (Monday as
|
||||
the first day of the week) as a decimal number (01-53).
|
||||
If the week containing January 1 has four or more days
|
||||
in the new year, then it is week 1; otherwise it is
|
||||
week 53 of the previous year, and the next week is week
|
||||
1.
|
||||
%U is replaced by the week number of the year (Sunday as the first
|
||||
day of the week) as a decimal number [00,53].
|
||||
|
||||
%W is replaced by the week number of the year (Monday as
|
||||
the first day of the week) as a decimal number (00-53).
|
||||
%u is replaced by the weekday (Monday as the first day of the week)
|
||||
as a decimal number [1,7].
|
||||
|
||||
%w is replaced by the weekday (Sunday as the first day of
|
||||
the week) as a decimal number (0-6).
|
||||
%V is replaced by the week number of the year (Monday as the first
|
||||
day of the week) as a decimal number [01,53]. If the week
|
||||
containing January 1 has four or more days in the new year, then
|
||||
it is week 1; otherwise it is week 53 of the previous year, and
|
||||
the next week is week 1. The year is given by the %G conversion
|
||||
specification.
|
||||
|
||||
%X is replaced by the locale's appropriate time
|
||||
representation.
|
||||
%x is replaced by the locale's appropriate date
|
||||
representation.
|
||||
%W is replaced by the week number of the year (Monday as the first
|
||||
day of the week) as a decimal number [00,53].
|
||||
|
||||
%Y is replaced by the year with century as a decimal
|
||||
number.
|
||||
%w is replaced by the weekday (Sunday as the first day of the week)
|
||||
as a decimal number [0,6].
|
||||
|
||||
%y is replaced by the year without century as a decimal
|
||||
number (00-99).
|
||||
%X is replaced by the locale's appropriate time representation.
|
||||
|
||||
%Z is replaced by the time zone name, or by the empty
|
||||
string if this is not determinable.
|
||||
%x is replaced by the locale's appropriate date representation.
|
||||
|
||||
%z is replaced by the offset from UTC in the format +HHMM
|
||||
or -HHMM as appropriate, with positive values
|
||||
representing locations east of Greenwich, or by the
|
||||
empty string if this is not determinable.
|
||||
%Y is replaced by the year with century as a decimal number.
|
||||
|
||||
%% is replaced by a single %.
|
||||
%y is replaced by the year without century as a decimal number
|
||||
[00,99].
|
||||
|
||||
%+ is replaced by the date and time in date(1) format.
|
||||
%Z is replaced by the time zone abbreviation, or by the empty
|
||||
string if this is not determinable.
|
||||
|
||||
%z is replaced by the offset from the Prime Meridian in the format
|
||||
+HHMM or -HHMM (ISO 8601) as appropriate, with positive values
|
||||
representing locations east of Greenwich, or by the empty string
|
||||
if this is not determinable. The numeric time zone abbreviation
|
||||
-0000 is used when the time is Universal Time but local time is
|
||||
indeterminate; by convention this is used for locations while
|
||||
uninhabited, and corresponds to a zero offset when the time zone
|
||||
abbreviation begins with "-".
|
||||
|
||||
%% is replaced by a single %.
|
||||
|
||||
%+ is replaced by the locale's date and time in date(1) format.
|
||||
|
||||
RETURN VALUE
|
||||
If the conversion is successful, strftime returns the number of bytes
|
||||
placed into the array, not counting the terminating NUL; errno is
|
||||
unchanged if the returned value is zero. Otherwise, errno is set to
|
||||
indicate the error, zero is returned, and the array contents are
|
||||
unspecified.
|
||||
|
||||
ERRORS
|
||||
This function fails if:
|
||||
|
||||
[ERANGE]
|
||||
The total number of resulting bytes, including the terminating
|
||||
NUL character, is more than maxsize.
|
||||
|
||||
This function may fail if:
|
||||
|
||||
[EOVERFLOW]
|
||||
The format includes an %s conversion and the number of seconds
|
||||
since the Epoch cannot be represented in a time_t.
|
||||
|
||||
SEE ALSO
|
||||
date(1), getenv(3), newctime(3), newtzset(3), time(2),
|
||||
tzfile(5)
|
||||
date(1), getenv(3), newctime(3), newtzset(3), time(2), tzfile(5)
|
||||
|
||||
BUGS
|
||||
There is no conversion specification for the phase of the moon.
|
||||
|
||||
NEWSTRFTIME(3)
|
||||
|
229
newtzset.3
229
newtzset.3
@ -3,33 +3,89 @@
|
||||
tzset \- initialize time conversion information
|
||||
.SH SYNOPSIS
|
||||
.nf
|
||||
.B void tzset()
|
||||
.ie \n(.g .ds - \f(CW-\fP
|
||||
.el .ds - \-
|
||||
.B #include <time.h>
|
||||
.PP
|
||||
.B cc ... -ltz
|
||||
.B timezone_t tzalloc(char const *TZ);
|
||||
.PP
|
||||
.B void tzfree(timezone_t tz);
|
||||
.PP
|
||||
.B void tzset(void);
|
||||
.PP
|
||||
.B cc ... \*-ltz
|
||||
.fi
|
||||
.SH DESCRIPTION
|
||||
.I Tzset
|
||||
uses the value of the environment variable
|
||||
.B TZ
|
||||
to set time conversion information used by
|
||||
.IR localtime .
|
||||
.ie '\(en'' .ds en \-
|
||||
.el .ds en \(en
|
||||
.ie '\(lq'' .ds lq \&"\"
|
||||
.el .ds lq \(lq\"
|
||||
.ie '\(rq'' .ds rq \&"\"
|
||||
.el .ds rq \(rq\"
|
||||
.de q
|
||||
\\$3\*(lq\\$1\*(rq\\$2
|
||||
..
|
||||
The
|
||||
.B tzalloc
|
||||
function
|
||||
allocates and returns a timezone object described by
|
||||
.BR TZ .
|
||||
If
|
||||
.B TZ
|
||||
does not appear in the environment,
|
||||
the best available approximation to local wall clock time, as specified
|
||||
by the
|
||||
.IR tzfile (5)-format
|
||||
is not a valid timezone description, or if the object cannot be allocated,
|
||||
.B tzalloc
|
||||
returns a null pointer and sets
|
||||
.BR errno .
|
||||
.PP
|
||||
The
|
||||
.B tzfree
|
||||
function
|
||||
frees a timezone object
|
||||
.BR tz ,
|
||||
which should have been successfully allocated by
|
||||
.BR tzalloc .
|
||||
This invalidates any
|
||||
.B tm_zone
|
||||
pointers that
|
||||
.B tz
|
||||
was used to set.
|
||||
.PP
|
||||
The
|
||||
.B tzset
|
||||
function
|
||||
acts like
|
||||
.BR tzalloc(getenv("TZ")) ,
|
||||
except it saves any resulting timezone object into internal
|
||||
storage that is accessed by
|
||||
.BR localtime ,
|
||||
.BR localtime_r ,
|
||||
and
|
||||
.BR mktime .
|
||||
The anonymous shared timezone object is freed by the next call to
|
||||
.BR tzset .
|
||||
If the implied call to
|
||||
.B tzalloc
|
||||
fails,
|
||||
.B tzset
|
||||
falls back on Universal Time (UT).
|
||||
.PP
|
||||
If
|
||||
.B TZ
|
||||
is null, the best available approximation to local (wall
|
||||
clock) time, as specified by the
|
||||
.BR tzfile (5)-format
|
||||
file
|
||||
.B localtime
|
||||
in the system time conversion information directory, is used by
|
||||
.IR localtime .
|
||||
in the system time conversion information directory, is used.
|
||||
If
|
||||
.B TZ
|
||||
appears in the environment but its value is a null string,
|
||||
Coordinated Universal Time (UTC) is used (without leap second
|
||||
correction). If
|
||||
is the empty string,
|
||||
UT is used, with the abbreviation "UTC"
|
||||
and without leap second correction; please see
|
||||
.BR newctime (3)
|
||||
for more about UT, UTC, and leap seconds. If
|
||||
.B TZ
|
||||
appears in the environment and its value is not a null string:
|
||||
is nonnull and nonempty:
|
||||
.IP
|
||||
if the value begins with a colon, it is used as a pathname of a file
|
||||
from which to read the time conversion information;
|
||||
@ -46,7 +102,7 @@ it is used as an absolute pathname; otherwise,
|
||||
it is used as a pathname relative to a system time conversion information
|
||||
directory.
|
||||
The file must be in the format specified in
|
||||
.IR tzfile (5).
|
||||
.BR tzfile (5).
|
||||
.PP
|
||||
When
|
||||
.B TZ
|
||||
@ -61,23 +117,31 @@ Where:
|
||||
.IR std " and " dst
|
||||
Three or more bytes that are the designation for the standard
|
||||
.RI ( std )
|
||||
or summer
|
||||
.RI ( dst )
|
||||
or the alternative
|
||||
.RI ( dst ,
|
||||
such as daylight saving time)
|
||||
time zone. Only
|
||||
.I std
|
||||
is required; if
|
||||
.I dst
|
||||
is missing, then summer time does not apply in this locale.
|
||||
is missing, then daylight saving time does not apply in this locale.
|
||||
Upper- and lowercase letters are explicitly allowed. Any characters
|
||||
except a leading colon
|
||||
.RB ( : ),
|
||||
digits, comma
|
||||
.RB ( , ),
|
||||
minus
|
||||
.RB ( \(mi ),
|
||||
plus
|
||||
.RB ( \(pl ),
|
||||
and ASCII NUL are allowed.
|
||||
ASCII minus
|
||||
.RB ( \*- ),
|
||||
ASCII plus
|
||||
.RB ( + ),
|
||||
and NUL bytes are allowed.
|
||||
Alternatively, a designation can be surrounded by angle brackets
|
||||
.B <
|
||||
and
|
||||
.BR > ;
|
||||
in this case, the designation can contain any characters other than
|
||||
.B >
|
||||
and NUL.
|
||||
.TP
|
||||
.I offset
|
||||
Indicates the value one must add to the local time to arrive at
|
||||
@ -103,17 +167,17 @@ is required. If no
|
||||
.I offset
|
||||
follows
|
||||
.IR dst ,
|
||||
summer time is assumed to be one hour ahead of standard time. One or
|
||||
daylight saving time is assumed to be one hour ahead of standard time. One or
|
||||
more digits may be used; the value is always interpreted as a decimal
|
||||
number. The hour must be between zero and 24, and the minutes (and
|
||||
seconds) \(em if present \(em between zero and 59. If preceded by a
|
||||
.RB `` \(mi '',
|
||||
seconds) \*(en if present \*(en between zero and 59. If preceded by a
|
||||
.q "\*-" ,
|
||||
the time zone shall be east of the Prime Meridian; otherwise it shall be
|
||||
west (which may be indicated by an optional preceding
|
||||
.RB `` \(pl '').
|
||||
.q "+" .
|
||||
.TP
|
||||
.I rule
|
||||
Indicates when to change to and back from summer time. The
|
||||
Indicates when to change to and back from daylight saving time. The
|
||||
.I rule
|
||||
has the form:
|
||||
.RS
|
||||
@ -123,13 +187,17 @@ has the form:
|
||||
.IP
|
||||
where the first
|
||||
.I date
|
||||
describes when the change from standard to summer time occurs and the
|
||||
describes when the change from standard to daylight saving time occurs and the
|
||||
second
|
||||
.I date
|
||||
describes when the change back happens. Each
|
||||
.I time
|
||||
field describes when, in current local time, the change to the other
|
||||
time is made.
|
||||
As an extension to POSIX, daylight saving is assumed to be in effect
|
||||
all year if it begins January 1 at 00:00 and ends December 31 at
|
||||
24:00 plus the difference between daylight saving and standard time,
|
||||
leaving no room for standard time in the calendar.
|
||||
.IP
|
||||
The format of
|
||||
.I date
|
||||
@ -140,8 +208,8 @@ is one of the following:
|
||||
The Julian day
|
||||
.I n
|
||||
.RI "(1\ \(<=" "\ n\ " "\(<=\ 365).
|
||||
Leap days are not counted; that is, in all years \(em including leap
|
||||
years \(em February 28 is day 59 and March 1 is day 60. It is
|
||||
Leap days are not counted; that is, in all years \*(en including leap
|
||||
years \*(en February 28 is day 59 and March 1 is day 60. It is
|
||||
impossible to explicitly refer to the occasional February 29.
|
||||
.TP
|
||||
.I n
|
||||
@ -161,10 +229,8 @@ of month
|
||||
of the year
|
||||
.RI "(1\ \(<=" "\ n\ " "\(<=\ 5,
|
||||
.RI "1\ \(<=" "\ m\ " "\(<=\ 12,
|
||||
where week 5 means ``the last
|
||||
.I d
|
||||
day in month
|
||||
.IR m ''
|
||||
where week 5 means
|
||||
.q "the last \fId\fP day in month \fIm\fP"
|
||||
which may occur in either the fourth or the fifth week). Week 1 is the
|
||||
first week in which the
|
||||
.IR d' th
|
||||
@ -175,27 +241,80 @@ The
|
||||
.I time
|
||||
has the same format as
|
||||
.I offset
|
||||
except that no leading sign
|
||||
.RB (`` \(mi ''
|
||||
except that POSIX does not allow a leading sign (\c
|
||||
.q "\*-"
|
||||
or
|
||||
.RB `` \(pl '')
|
||||
is allowed. The default, if
|
||||
.q "+" ).
|
||||
As an extension to POSIX, the hours part of
|
||||
.I time
|
||||
can range from \-167 through 167; this allows for unusual rules such
|
||||
as
|
||||
.q "the Saturday before the first Sunday of March" .
|
||||
The default, if
|
||||
.I time
|
||||
is not given, is
|
||||
.BR 02:00:00 .
|
||||
.RE
|
||||
.LP
|
||||
Here are some examples of
|
||||
.B TZ
|
||||
values that directly specify the timezone; they use some of the
|
||||
extensions to POSIX.
|
||||
.TP
|
||||
.B EST5
|
||||
stands for US Eastern Standard
|
||||
Time (EST), 5 hours behind UT, without daylight saving.
|
||||
.TP
|
||||
.B <+12>\*-12<+13>,M11.1.0,M1.2.1/147
|
||||
stands for Fiji time, 12 hours ahead
|
||||
of UT, springing forward on November's first Sunday at 02:00, and
|
||||
falling back on January's second Monday at 147:00 (i.e., 03:00 on the
|
||||
first Sunday on or after January 14). The abbreviations for standard
|
||||
and daylight saving time are
|
||||
.q "+12"
|
||||
and
|
||||
.q "+13".
|
||||
.TP
|
||||
.B IST\*-2IDT,M3.4.4/26,M10.5.0
|
||||
stands for Israel Standard Time (IST) and Israel Daylight Time (IDT),
|
||||
2 hours ahead of UT, springing forward on March's fourth
|
||||
Thursday at 26:00 (i.e., 02:00 on the first Friday on or after March
|
||||
23), and falling back on October's last Sunday at 02:00.
|
||||
.TP
|
||||
.B <\*-04>4<\*-03>,J1/0,J365/25
|
||||
stands for permanent daylight saving time, 3 hours behind UT with
|
||||
abbreviation
|
||||
.q "\*-03".
|
||||
There is a dummy fall-back transition on December 31 at 25:00 daylight
|
||||
saving time (i.e., 24:00 standard time, equivalent to January 1 at
|
||||
00:00 standard time), and a simultaneous spring-forward transition on
|
||||
January 1 at 00:00 standard time, so daylight saving time is in effect
|
||||
all year and the initial
|
||||
.B <\*-04>
|
||||
is a placeholder.
|
||||
.TP
|
||||
.B <\*-03>3<\*-02>,M3.5.0/\*-2,M10.5.0/\*-1
|
||||
stands for time in western Greenland, 3 hours behind UT, where clocks
|
||||
follow the EU rules of
|
||||
springing forward on March's last Sunday at 01:00 UT (\-02:00 local
|
||||
time, i.e., 22:00 the previous day) and falling back on October's last
|
||||
Sunday at 01:00 UT (\-01:00 local time, i.e., 23:00 the previous day).
|
||||
The abbreviations for standard and daylight saving time are
|
||||
.q "\*-03"
|
||||
and
|
||||
.q "\*-02".
|
||||
.PP
|
||||
If no
|
||||
.I rule
|
||||
is present in
|
||||
.BR TZ ,
|
||||
the rules specified
|
||||
by the
|
||||
.IR tzfile (5)-format
|
||||
.BR tzfile (5)-format
|
||||
file
|
||||
.B posixrules
|
||||
in the system time conversion information directory are used, with the
|
||||
standard and summer time offsets from UTC replaced by those specified by
|
||||
standard and daylight saving time offsets from UT replaced by those specified by
|
||||
the
|
||||
.I offset
|
||||
values in
|
||||
@ -206,34 +325,26 @@ For compatibility with System V Release 3.1, a semicolon
|
||||
may be used to separate the
|
||||
.I rule
|
||||
from the rest of the specification.
|
||||
.PP
|
||||
If the
|
||||
.B TZ
|
||||
environment variable does not specify a
|
||||
.IR tzfile (5)-format
|
||||
and cannot be interpreted as a direct specification,
|
||||
UTC is used.
|
||||
.SH FILES
|
||||
.ta \w'/usr/local/etc/zoneinfo/posixrules\0\0'u
|
||||
/usr/local/etc/zoneinfo time zone information directory
|
||||
.ta \w'/usr/share/zoneinfo/posixrules\0\0'u
|
||||
/usr/share/zoneinfo timezone information directory
|
||||
.br
|
||||
/usr/local/etc/zoneinfo/localtime local time zone file
|
||||
/usr/share/zoneinfo/localtime local timezone file
|
||||
.br
|
||||
/usr/local/etc/zoneinfo/posixrules used with POSIX-style TZ's
|
||||
/usr/share/zoneinfo/posixrules used with POSIX-style TZ's
|
||||
.br
|
||||
/usr/local/etc/zoneinfo/GMT for UTC leap seconds
|
||||
/usr/share/zoneinfo/GMT for UTC leap seconds
|
||||
.sp
|
||||
If
|
||||
.B /usr/local/etc/zoneinfo/GMT
|
||||
.B /usr/share/zoneinfo/GMT
|
||||
is absent,
|
||||
UTC leap seconds are loaded from
|
||||
.BR /usr/local/etc/zoneinfo/posixrules .
|
||||
.BR /usr/share/zoneinfo/posixrules .
|
||||
.SH SEE ALSO
|
||||
getenv(3),
|
||||
newctime(3),
|
||||
newstrftime(3),
|
||||
time(2),
|
||||
tzfile(5)
|
||||
.\" @(#)newtzset.3 8.2
|
||||
.\" This file is in the public domain, so clarified as of
|
||||
.\" 2009-05-17 by Arthur David Olson.
|
||||
|
290
newtzset.3.txt
290
newtzset.3.txt
@ -1,153 +1,199 @@
|
||||
NAME
|
||||
NEWTZSET(3) Library Functions Manual NEWTZSET(3)
|
||||
|
||||
tzset - initialize time conversion information
|
||||
NAME
|
||||
tzset - initialize time conversion information
|
||||
|
||||
SYNOPSIS
|
||||
void tzset()
|
||||
#include <time.h>
|
||||
|
||||
cc ... -ltz
|
||||
timezone_t tzalloc(char const *TZ);
|
||||
|
||||
void tzfree(timezone_t tz);
|
||||
|
||||
void tzset(void);
|
||||
|
||||
cc ... -ltz
|
||||
|
||||
DESCRIPTION
|
||||
Tzset uses the value of the environment variable TZ to set
|
||||
time conversion information used by localtime. If TZ does
|
||||
not appear in the environment, the best available
|
||||
approximation to local wall clock time, as specified by the
|
||||
tzfile(5)-format file localtime in the system time
|
||||
conversion information directory, is used by localtime. If
|
||||
TZ appears in the environment but its value is a null
|
||||
string, Coordinated Universal Time (UTC) is used (without
|
||||
leap second correction). If TZ appears in the environment
|
||||
and its value is not a null string:
|
||||
The tzalloc function allocates and returns a timezone object described
|
||||
by TZ. If TZ is not a valid timezone description, or if the object
|
||||
cannot be allocated, tzalloc returns a null pointer and sets errno.
|
||||
|
||||
if the value begins with a colon, it is used as a
|
||||
pathname of a file from which to read the time
|
||||
conversion information;
|
||||
The tzfree function frees a timezone object tz, which should have been
|
||||
successfully allocated by tzalloc. This invalidates any tm_zone
|
||||
pointers that tz was used to set.
|
||||
|
||||
if the value does not begin with a colon, it is first
|
||||
used as the pathname of a file from which to read the
|
||||
time conversion information, and, if that file cannot
|
||||
be read, is used directly as a specification of the
|
||||
time conversion information.
|
||||
The tzset function acts like tzalloc(getenv("TZ")), except it saves any
|
||||
resulting timezone object into internal storage that is accessed by
|
||||
localtime, localtime_r, and mktime. The anonymous shared timezone
|
||||
object is freed by the next call to tzset. If the implied call to
|
||||
tzalloc fails, tzset falls back on Universal Time (UT).
|
||||
|
||||
When TZ is used as a pathname, if it begins with a slash, it
|
||||
is used as an absolute pathname; otherwise, it is used as a
|
||||
pathname relative to a system time conversion information
|
||||
directory. The file must be in the format specified in
|
||||
tzfile(5).
|
||||
If TZ is null, the best available approximation to local (wall clock)
|
||||
time, as specified by the tzfile(5)-format file localtime in the system
|
||||
time conversion information directory, is used. If TZ is the empty
|
||||
string, UT is used, with the abbreviation "UTC" and without leap second
|
||||
correction; please see newctime(3) for more about UT, UTC, and leap
|
||||
seconds. If TZ is nonnull and nonempty:
|
||||
|
||||
When TZ is used directly as a specification of the time
|
||||
conversion information, it must have the following syntax
|
||||
(spaces inserted for clarity):
|
||||
if the value begins with a colon, it is used as a pathname of a
|
||||
file from which to read the time conversion information;
|
||||
|
||||
stdoffset[dst[offset][,rule]]
|
||||
if the value does not begin with a colon, it is first used as
|
||||
the pathname of a file from which to read the time conversion
|
||||
information, and, if that file cannot be read, is used directly
|
||||
as a specification of the time conversion information.
|
||||
|
||||
Where:
|
||||
When TZ is used as a pathname, if it begins with a slash, it is used as
|
||||
an absolute pathname; otherwise, it is used as a pathname relative to a
|
||||
system time conversion information directory. The file must be in the
|
||||
format specified in tzfile(5).
|
||||
|
||||
std and dst Three or more bytes that are the
|
||||
designation for the standard (std) or
|
||||
summer (dst) time zone. Only std is
|
||||
required; if dst is missing, then summer
|
||||
time does not apply in this locale.
|
||||
Upper- and lowercase letters are
|
||||
explicitly allowed. Any characters
|
||||
except a leading colon (:), digits,
|
||||
comma (,), minus (-), plus (+), and
|
||||
ASCII NUL are allowed.
|
||||
When TZ is used directly as a specification of the time conversion
|
||||
information, it must have the following syntax (spaces inserted for
|
||||
clarity):
|
||||
|
||||
offset Indicates the value one must add to the
|
||||
local time to arrive at Coordinated
|
||||
Universal Time. The offset has the
|
||||
form:
|
||||
stdoffset[dst[offset][,rule]]
|
||||
|
||||
hh[:mm[:ss]]
|
||||
Where:
|
||||
|
||||
The minutes (mm) and seconds (ss) are
|
||||
optional. The hour (hh) is required and
|
||||
may be a single digit. The offset
|
||||
following std is required. If no offset
|
||||
follows dst, summer time is assumed to
|
||||
be one hour ahead of standard time. One
|
||||
or more digits may be used; the value is
|
||||
always interpreted as a decimal number.
|
||||
The hour must be between zero and 24,
|
||||
and the minutes (and seconds) -- if
|
||||
present -- between zero and 59. If
|
||||
preceded by a ``-'', the time zone shall
|
||||
be east of the Prime Meridian; otherwise
|
||||
it shall be west (which may be indicated
|
||||
by an optional preceding ``+'').
|
||||
std and dst Three or more bytes that are the designation for
|
||||
the standard (std) or the alternative (dst, such
|
||||
as daylight saving time) time zone. Only std is
|
||||
required; if dst is missing, then daylight saving
|
||||
time does not apply in this locale. Upper- and
|
||||
lowercase letters are explicitly allowed. Any
|
||||
characters except a leading colon (:), digits,
|
||||
comma (,), ASCII minus (-), ASCII plus (+), and
|
||||
NUL bytes are allowed. Alternatively, a
|
||||
designation can be surrounded by angle brackets <
|
||||
and >; in this case, the designation can contain
|
||||
any characters other than > and NUL.
|
||||
|
||||
rule Indicates when to change to and back
|
||||
from summer time. The rule has the
|
||||
form:
|
||||
offset Indicates the value one must add to the local
|
||||
time to arrive at Coordinated Universal Time.
|
||||
The offset has the form:
|
||||
|
||||
date/time,date/time
|
||||
hh[:mm[:ss]]
|
||||
|
||||
where the first date describes when the
|
||||
change from standard to summer time
|
||||
occurs and the second date describes
|
||||
when the change back happens. Each time
|
||||
field describes when, in current local
|
||||
time, the change to the other time is
|
||||
made.
|
||||
The minutes (mm) and seconds (ss) are optional.
|
||||
The hour (hh) is required and may be a single
|
||||
digit. The offset following std is required. If
|
||||
no offset follows dst, daylight saving time is
|
||||
assumed to be one hour ahead of standard time.
|
||||
One or more digits may be used; the value is
|
||||
always interpreted as a decimal number. The hour
|
||||
must be between zero and 24, and the minutes (and
|
||||
seconds) - if present - between zero and 59. If
|
||||
preceded by a "-", the time zone shall be east of
|
||||
the Prime Meridian; otherwise it shall be west
|
||||
(which may be indicated by an optional preceding
|
||||
"+".
|
||||
|
||||
The format of date is one of the
|
||||
following:
|
||||
rule Indicates when to change to and back from
|
||||
daylight saving time. The rule has the form:
|
||||
|
||||
Jn The Julian day n
|
||||
(1 <= n <= 365). Leap days
|
||||
are not counted; that is, in
|
||||
all years -- including leap
|
||||
years -- February 28 is day 59
|
||||
and March 1 is day 60. It is
|
||||
impossible to explicitly refer
|
||||
to the occasional February 29.
|
||||
date/time,date/time
|
||||
|
||||
n The zero-based Julian day
|
||||
(0 <= n <= 365). Leap days
|
||||
are counted, and it is
|
||||
possible to refer to February
|
||||
29.
|
||||
where the first date describes when the change
|
||||
from standard to daylight saving time occurs and
|
||||
the second date describes when the change back
|
||||
happens. Each time field describes when, in
|
||||
current local time, the change to the other time
|
||||
is made. As an extension to POSIX, daylight
|
||||
saving is assumed to be in effect all year if it
|
||||
begins January 1 at 00:00 and ends December 31 at
|
||||
24:00 plus the difference between daylight saving
|
||||
and standard time, leaving no room for standard
|
||||
time in the calendar.
|
||||
|
||||
Mm.n.d The d'th day (0 <= d <= 6) of
|
||||
week n of month m of the year
|
||||
(1 <= n <= 5, 1 <= m <= 12,
|
||||
where week 5 means ``the last
|
||||
d day in month m'' which may
|
||||
occur in either the fourth or
|
||||
the fifth week). Week 1 is
|
||||
the first week in which the
|
||||
d'th day occurs. Day zero is
|
||||
Sunday.
|
||||
The format of date is one of the following:
|
||||
|
||||
The time has the same format as offset
|
||||
except that no leading sign (``-'' or
|
||||
``+'') is allowed. The default, if time
|
||||
is not given, is 02:00:00.
|
||||
Jn The Julian day n (1 <= n <= 365). Leap
|
||||
days are not counted; that is, in all
|
||||
years - including leap years - February
|
||||
28 is day 59 and March 1 is day 60. It
|
||||
is impossible to explicitly refer to
|
||||
the occasional February 29.
|
||||
|
||||
If no rule is present in TZ, the rules specified by the
|
||||
tzfile(5)-format file posixrules in the system time
|
||||
conversion information directory are used, with the standard
|
||||
and summer time offsets from UTC replaced by those specified
|
||||
by the offset values in TZ.
|
||||
For compatibility with System V Release 3.1, a semicolon (;)
|
||||
may be used to separate the rule from the rest of the
|
||||
specification.
|
||||
n The zero-based Julian day
|
||||
(0 <= n <= 365). Leap days are
|
||||
counted, and it is possible to refer to
|
||||
February 29.
|
||||
|
||||
If the TZ environment variable does not specify a
|
||||
tzfile(5)-format and cannot be interpreted as a direct
|
||||
specification, UTC is used.
|
||||
Mm.n.d The d'th day (0 <= d <= 6) of week n of
|
||||
month m of the year (1 <= n <= 5,
|
||||
1 <= m <= 12, where week 5 means "the
|
||||
last d day in month m" which may occur
|
||||
in either the fourth or the fifth
|
||||
week). Week 1 is the first week in
|
||||
which the d'th day occurs. Day zero is
|
||||
Sunday.
|
||||
|
||||
The time has the same format as offset except
|
||||
that POSIX does not allow a leading sign ("-" or
|
||||
"+"). As an extension to POSIX, the hours part
|
||||
of time can range from -167 through 167; this
|
||||
allows for unusual rules such as "the Saturday
|
||||
before the first Sunday of March". The default,
|
||||
if time is not given, is 02:00:00.
|
||||
|
||||
Here are some examples of TZ values that directly specify the timezone;
|
||||
they use some of the extensions to POSIX.
|
||||
|
||||
EST5 stands for US Eastern Standard Time (EST), 5 hours behind UT,
|
||||
without daylight saving.
|
||||
|
||||
<+12>-12<+13>,M11.1.0,M1.2.1/147
|
||||
stands for Fiji time, 12 hours ahead of UT, springing forward on
|
||||
November's first Sunday at 02:00, and falling back on January's
|
||||
second Monday at 147:00 (i.e., 03:00 on the first Sunday on or
|
||||
after January 14). The abbreviations for standard and daylight
|
||||
saving time are "+12" and "+13".
|
||||
|
||||
IST-2IDT,M3.4.4/26,M10.5.0
|
||||
stands for Israel Standard Time (IST) and Israel Daylight Time
|
||||
(IDT), 2 hours ahead of UT, springing forward on March's fourth
|
||||
Thursday at 26:00 (i.e., 02:00 on the first Friday on or after
|
||||
March 23), and falling back on October's last Sunday at 02:00.
|
||||
|
||||
<-04>4<-03>,J1/0,J365/25
|
||||
stands for permanent daylight saving time, 3 hours behind UT
|
||||
with abbreviation "-03". There is a dummy fall-back transition
|
||||
on December 31 at 25:00 daylight saving time (i.e., 24:00
|
||||
standard time, equivalent to January 1 at 00:00 standard time),
|
||||
and a simultaneous spring-forward transition on January 1 at
|
||||
00:00 standard time, so daylight saving time is in effect all
|
||||
year and the initial <-04> is a placeholder.
|
||||
|
||||
<-03>3<-02>,M3.5.0/-2,M10.5.0/-1
|
||||
stands for time in western Greenland, 3 hours behind UT, where
|
||||
clocks follow the EU rules of springing forward on March's last
|
||||
Sunday at 01:00 UT (-02:00 local time, i.e., 22:00 the previous
|
||||
day) and falling back on October's last Sunday at 01:00 UT
|
||||
(-01:00 local time, i.e., 23:00 the previous day). The
|
||||
abbreviations for standard and daylight saving time are "-03"
|
||||
and "-02".
|
||||
|
||||
If no rule is present in TZ, the rules specified by the
|
||||
tzfile(5)-format file posixrules in the system time conversion
|
||||
information directory are used, with the standard and daylight saving
|
||||
time offsets from UT replaced by those specified by the offset values
|
||||
in TZ.
|
||||
|
||||
For compatibility with System V Release 3.1, a semicolon (;) may be
|
||||
used to separate the rule from the rest of the specification.
|
||||
|
||||
FILES
|
||||
/usr/local/etc/zoneinfo time zone information
|
||||
directory
|
||||
/usr/local/etc/zoneinfo/localtime local time zone file
|
||||
/usr/local/etc/zoneinfo/posixrules used with POSIX-style
|
||||
TZ's
|
||||
/usr/local/etc/zoneinfo/GMT for UTC leap seconds
|
||||
/usr/share/zoneinfo timezone information directory
|
||||
/usr/share/zoneinfo/localtime local timezone file
|
||||
/usr/share/zoneinfo/posixrules used with POSIX-style TZ's
|
||||
/usr/share/zoneinfo/GMT for UTC leap seconds
|
||||
|
||||
If /usr/local/etc/zoneinfo/GMT is absent, UTC leap seconds
|
||||
are loaded from /usr/local/etc/zoneinfo/posixrules.
|
||||
If /usr/share/zoneinfo/GMT is absent, UTC leap seconds are loaded from
|
||||
/usr/share/zoneinfo/posixrules.
|
||||
|
||||
SEE ALSO
|
||||
getenv(3), newctime(3), newstrftime(3), time(2), tzfile(5)
|
||||
getenv(3), newctime(3), newstrftime(3), time(2), tzfile(5)
|
||||
|
||||
NEWTZSET(3)
|
||||
|
826
private.h
826
private.h
@ -1,3 +1,5 @@
|
||||
/* Private header for tzdb code. */
|
||||
|
||||
#ifndef PRIVATE_H
|
||||
|
||||
#define PRIVATE_H
|
||||
@ -16,201 +18,665 @@
|
||||
*/
|
||||
|
||||
/*
|
||||
** ID
|
||||
** zdump has been made independent of the rest of the time
|
||||
** conversion package to increase confidence in the verification it provides.
|
||||
** You can use zdump to help in verifying other implementations.
|
||||
** To do this, compile with -DUSE_LTZ=0 and link without the tz library.
|
||||
*/
|
||||
#ifndef USE_LTZ
|
||||
# define USE_LTZ 1
|
||||
#endif
|
||||
|
||||
#ifndef lint
|
||||
#ifndef NOID
|
||||
static char privatehid[] = "@(#)private.h 8.6";
|
||||
#endif /* !defined NOID */
|
||||
#endif /* !defined lint */
|
||||
|
||||
/* This string was in the Factory zone through version 2016f. */
|
||||
#define GRANDPARENTED "Local time zone must be set--see zic manual page"
|
||||
|
||||
/*
|
||||
** Defaults for preprocessor symbols.
|
||||
** You can override these in your C compiler options, e.g. `-DHAVE_ADJTIME=0'.
|
||||
** You can override these in your C compiler options, e.g. '-DHAVE_GETTEXT=1'.
|
||||
*/
|
||||
|
||||
#ifndef HAVE_ADJTIME
|
||||
#define HAVE_ADJTIME 1
|
||||
#endif /* !defined HAVE_ADJTIME */
|
||||
#ifndef HAVE_DECL_ASCTIME_R
|
||||
# define HAVE_DECL_ASCTIME_R 1
|
||||
#endif
|
||||
|
||||
#if !defined HAVE_GENERIC && defined __has_extension
|
||||
# if __has_extension(c_generic_selections)
|
||||
# define HAVE_GENERIC 1
|
||||
# else
|
||||
# define HAVE_GENERIC 0
|
||||
# endif
|
||||
#endif
|
||||
/* _Generic is buggy in pre-4.9 GCC. */
|
||||
#if !defined HAVE_GENERIC && defined __GNUC__
|
||||
# define HAVE_GENERIC (4 < __GNUC__ + (9 <= __GNUC_MINOR__))
|
||||
#endif
|
||||
#ifndef HAVE_GENERIC
|
||||
# define HAVE_GENERIC (201112 <= __STDC_VERSION__)
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_GETTEXT
|
||||
#define HAVE_GETTEXT 0
|
||||
# define HAVE_GETTEXT 0
|
||||
#endif /* !defined HAVE_GETTEXT */
|
||||
|
||||
#ifndef HAVE_INCOMPATIBLE_CTIME_R
|
||||
#define HAVE_INCOMPATIBLE_CTIME_R 0
|
||||
#endif /* !defined INCOMPATIBLE_CTIME_R */
|
||||
# define HAVE_INCOMPATIBLE_CTIME_R 0
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_SETTIMEOFDAY
|
||||
#define HAVE_SETTIMEOFDAY 3
|
||||
#endif /* !defined HAVE_SETTIMEOFDAY */
|
||||
#ifndef HAVE_LINK
|
||||
# define HAVE_LINK 1
|
||||
#endif /* !defined HAVE_LINK */
|
||||
|
||||
#ifndef HAVE_MALLOC_ERRNO
|
||||
# define HAVE_MALLOC_ERRNO 1
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_POSIX_DECLS
|
||||
# define HAVE_POSIX_DECLS 1
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_STDBOOL_H
|
||||
# define HAVE_STDBOOL_H (199901 <= __STDC_VERSION__)
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_STRDUP
|
||||
# define HAVE_STRDUP 1
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_STRTOLL
|
||||
# define HAVE_STRTOLL 1
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_SYMLINK
|
||||
#define HAVE_SYMLINK 1
|
||||
# define HAVE_SYMLINK 1
|
||||
#endif /* !defined HAVE_SYMLINK */
|
||||
|
||||
#ifndef HAVE_SYS_STAT_H
|
||||
#define HAVE_SYS_STAT_H 1
|
||||
# define HAVE_SYS_STAT_H 1
|
||||
#endif /* !defined HAVE_SYS_STAT_H */
|
||||
|
||||
#ifndef HAVE_SYS_WAIT_H
|
||||
#define HAVE_SYS_WAIT_H 1
|
||||
#endif /* !defined HAVE_SYS_WAIT_H */
|
||||
|
||||
#ifndef HAVE_UNISTD_H
|
||||
#define HAVE_UNISTD_H 1
|
||||
# define HAVE_UNISTD_H 1
|
||||
#endif /* !defined HAVE_UNISTD_H */
|
||||
|
||||
#ifndef HAVE_UTMPX_H
|
||||
#define HAVE_UTMPX_H 0
|
||||
# define HAVE_UTMPX_H 1
|
||||
#endif /* !defined HAVE_UTMPX_H */
|
||||
|
||||
#ifndef LOCALE_HOME
|
||||
#define LOCALE_HOME "/usr/lib/locale"
|
||||
#endif /* !defined LOCALE_HOME */
|
||||
#ifndef NETBSD_INSPIRED
|
||||
# define NETBSD_INSPIRED 1
|
||||
#endif
|
||||
|
||||
#if HAVE_INCOMPATIBLE_CTIME_R
|
||||
#define asctime_r _incompatible_asctime_r
|
||||
#define ctime_r _incompatible_ctime_r
|
||||
# define asctime_r _incompatible_asctime_r
|
||||
# define ctime_r _incompatible_ctime_r
|
||||
#endif /* HAVE_INCOMPATIBLE_CTIME_R */
|
||||
|
||||
/* Enable tm_gmtoff, tm_zone, and environ on GNUish systems. */
|
||||
#define _GNU_SOURCE 1
|
||||
/* Fix asctime_r on Solaris 11. */
|
||||
#define _POSIX_PTHREAD_SEMANTICS 1
|
||||
/* Enable strtoimax on pre-C99 Solaris 11. */
|
||||
#define __EXTENSIONS__ 1
|
||||
|
||||
/* To avoid having 'stat' fail unnecessarily with errno == EOVERFLOW,
|
||||
enable large files on GNUish systems ... */
|
||||
#ifndef _FILE_OFFSET_BITS
|
||||
# define _FILE_OFFSET_BITS 64
|
||||
#endif
|
||||
/* ... and on AIX ... */
|
||||
#define _LARGE_FILES 1
|
||||
/* ... and enable large inode numbers on Mac OS X 10.5 and later. */
|
||||
#define _DARWIN_USE_64_BIT_INODE 1
|
||||
|
||||
/*
|
||||
** Nested includes
|
||||
*/
|
||||
|
||||
#include "sys/types.h" /* for time_t */
|
||||
#include "stdio.h"
|
||||
#include "errno.h"
|
||||
#include "string.h"
|
||||
#include "limits.h" /* for CHAR_BIT et al. */
|
||||
#include "time.h"
|
||||
#include "stdlib.h"
|
||||
/* Avoid clashes with NetBSD by renaming NetBSD's declarations.
|
||||
If defining the 'timezone' variable, avoid a clash with FreeBSD's
|
||||
'timezone' function by renaming its declaration. */
|
||||
#define localtime_rz sys_localtime_rz
|
||||
#define mktime_z sys_mktime_z
|
||||
#define posix2time_z sys_posix2time_z
|
||||
#define time2posix_z sys_time2posix_z
|
||||
#if defined USG_COMPAT && USG_COMPAT == 2
|
||||
# define timezone sys_timezone
|
||||
#endif
|
||||
#define timezone_t sys_timezone_t
|
||||
#define tzalloc sys_tzalloc
|
||||
#define tzfree sys_tzfree
|
||||
#include <time.h>
|
||||
#undef localtime_rz
|
||||
#undef mktime_z
|
||||
#undef posix2time_z
|
||||
#undef time2posix_z
|
||||
#if defined USG_COMPAT && USG_COMPAT == 2
|
||||
# undef timezone
|
||||
#endif
|
||||
#undef timezone_t
|
||||
#undef tzalloc
|
||||
#undef tzfree
|
||||
|
||||
#include <sys/types.h> /* for time_t */
|
||||
#include <string.h>
|
||||
#include <limits.h> /* for CHAR_BIT et al. */
|
||||
#include <stdlib.h>
|
||||
|
||||
#include <errno.h>
|
||||
|
||||
#ifndef EINVAL
|
||||
# define EINVAL ERANGE
|
||||
#endif
|
||||
|
||||
#ifndef ELOOP
|
||||
# define ELOOP EINVAL
|
||||
#endif
|
||||
#ifndef ENAMETOOLONG
|
||||
# define ENAMETOOLONG EINVAL
|
||||
#endif
|
||||
#ifndef ENOMEM
|
||||
# define ENOMEM EINVAL
|
||||
#endif
|
||||
#ifndef ENOTSUP
|
||||
# define ENOTSUP EINVAL
|
||||
#endif
|
||||
#ifndef EOVERFLOW
|
||||
# define EOVERFLOW EINVAL
|
||||
#endif
|
||||
|
||||
#if HAVE_GETTEXT
|
||||
#include "libintl.h"
|
||||
# include <libintl.h>
|
||||
#endif /* HAVE_GETTEXT */
|
||||
|
||||
#if HAVE_SYS_WAIT_H
|
||||
#include <sys/wait.h> /* for WIFEXITED and WEXITSTATUS */
|
||||
#endif /* HAVE_SYS_WAIT_H */
|
||||
|
||||
#ifndef WIFEXITED
|
||||
#define WIFEXITED(status) (((status) & 0xff) == 0)
|
||||
#endif /* !defined WIFEXITED */
|
||||
#ifndef WEXITSTATUS
|
||||
#define WEXITSTATUS(status) (((status) >> 8) & 0xff)
|
||||
#endif /* !defined WEXITSTATUS */
|
||||
|
||||
#if HAVE_UNISTD_H
|
||||
#include "unistd.h" /* for F_OK, R_OK, and other POSIX goodness */
|
||||
# include <unistd.h> /* for R_OK, and other POSIX goodness */
|
||||
#endif /* HAVE_UNISTD_H */
|
||||
|
||||
#ifndef F_OK
|
||||
#define F_OK 0
|
||||
#endif /* !defined F_OK */
|
||||
#ifndef R_OK
|
||||
#define R_OK 4
|
||||
#endif /* !defined R_OK */
|
||||
#ifndef HAVE_STRFTIME_L
|
||||
# if _POSIX_VERSION < 200809
|
||||
# define HAVE_STRFTIME_L 0
|
||||
# else
|
||||
# define HAVE_STRFTIME_L 1
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/* Unlike <ctype.h>'s isdigit, this also works if c < 0 | c > UCHAR_MAX. */
|
||||
#define is_digit(c) ((unsigned)(c) - '0' <= 9)
|
||||
#ifndef USG_COMPAT
|
||||
# ifndef _XOPEN_VERSION
|
||||
# define USG_COMPAT 0
|
||||
# else
|
||||
# define USG_COMPAT 1
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_TZNAME
|
||||
# if _POSIX_VERSION < 198808 && !USG_COMPAT
|
||||
# define HAVE_TZNAME 0
|
||||
# else
|
||||
# define HAVE_TZNAME 1
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifndef ALTZONE
|
||||
# if defined __sun || defined _M_XENIX
|
||||
# define ALTZONE 1
|
||||
# else
|
||||
# define ALTZONE 0
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifndef R_OK
|
||||
# define R_OK 4
|
||||
#endif /* !defined R_OK */
|
||||
|
||||
/*
|
||||
** Define HAVE_STDINT_H's default value here, rather than at the
|
||||
** start, since __GLIBC__'s value depends on previously-included
|
||||
** files.
|
||||
** (glibc 2.1 and later have stdint.h, even with pre-C99 compilers.)
|
||||
** start, since __GLIBC__ and INTMAX_MAX's values depend on
|
||||
** previously-included files. glibc 2.1 and Solaris 10 and later have
|
||||
** stdint.h, even with pre-C99 compilers.
|
||||
*/
|
||||
#ifndef HAVE_STDINT_H
|
||||
#define HAVE_STDINT_H \
|
||||
(199901 <= __STDC_VERSION__ || \
|
||||
2 < (__GLIBC__ + (0 < __GLIBC_MINOR__)))
|
||||
# define HAVE_STDINT_H \
|
||||
(199901 <= __STDC_VERSION__ \
|
||||
|| 2 < __GLIBC__ + (1 <= __GLIBC_MINOR__) \
|
||||
|| __CYGWIN__ || INTMAX_MAX)
|
||||
#endif /* !defined HAVE_STDINT_H */
|
||||
|
||||
#if HAVE_STDINT_H
|
||||
#include "stdint.h"
|
||||
# include <stdint.h>
|
||||
#endif /* !HAVE_STDINT_H */
|
||||
|
||||
#ifndef INT_FAST64_MAX
|
||||
#ifndef HAVE_INTTYPES_H
|
||||
# define HAVE_INTTYPES_H HAVE_STDINT_H
|
||||
#endif
|
||||
#if HAVE_INTTYPES_H
|
||||
# include <inttypes.h>
|
||||
#endif
|
||||
|
||||
/* Pre-C99 GCC compilers define __LONG_LONG_MAX__ instead of LLONG_MAX. */
|
||||
#if defined LLONG_MAX || defined __LONG_LONG_MAX__
|
||||
#ifdef __LONG_LONG_MAX__
|
||||
# ifndef LLONG_MAX
|
||||
# define LLONG_MAX __LONG_LONG_MAX__
|
||||
# endif
|
||||
# ifndef LLONG_MIN
|
||||
# define LLONG_MIN (-1 - LLONG_MAX)
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifndef INT_FAST64_MAX
|
||||
# ifdef LLONG_MAX
|
||||
typedef long long int_fast64_t;
|
||||
#else /* ! (defined LLONG_MAX || defined __LONG_LONG_MAX__) */
|
||||
#if (LONG_MAX >> 31) < 0xffffffff
|
||||
# define INT_FAST64_MIN LLONG_MIN
|
||||
# define INT_FAST64_MAX LLONG_MAX
|
||||
# else
|
||||
# if LONG_MAX >> 31 < 0xffffffff
|
||||
Please use a compiler that supports a 64-bit integer type (or wider);
|
||||
you may need to compile with "-DHAVE_STDINT_H".
|
||||
#endif /* (LONG_MAX >> 31) < 0xffffffff */
|
||||
# endif
|
||||
typedef long int_fast64_t;
|
||||
#endif /* ! (defined LLONG_MAX || defined __LONG_LONG_MAX__) */
|
||||
#endif /* !defined INT_FAST64_MAX */
|
||||
# define INT_FAST64_MIN LONG_MIN
|
||||
# define INT_FAST64_MAX LONG_MAX
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifndef PRIdFAST64
|
||||
# if INT_FAST64_MAX == LLONG_MAX
|
||||
# define PRIdFAST64 "lld"
|
||||
# else
|
||||
# define PRIdFAST64 "ld"
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifndef SCNdFAST64
|
||||
# define SCNdFAST64 PRIdFAST64
|
||||
#endif
|
||||
|
||||
#ifndef INT_FAST32_MAX
|
||||
# if INT_MAX >> 31 == 0
|
||||
typedef long int_fast32_t;
|
||||
# define INT_FAST32_MAX LONG_MAX
|
||||
# define INT_FAST32_MIN LONG_MIN
|
||||
# else
|
||||
typedef int int_fast32_t;
|
||||
# define INT_FAST32_MAX INT_MAX
|
||||
# define INT_FAST32_MIN INT_MIN
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifndef INTMAX_MAX
|
||||
# ifdef LLONG_MAX
|
||||
typedef long long intmax_t;
|
||||
# if HAVE_STRTOLL
|
||||
# define strtoimax strtoll
|
||||
# endif
|
||||
# define INTMAX_MAX LLONG_MAX
|
||||
# define INTMAX_MIN LLONG_MIN
|
||||
# else
|
||||
typedef long intmax_t;
|
||||
# define INTMAX_MAX LONG_MAX
|
||||
# define INTMAX_MIN LONG_MIN
|
||||
# endif
|
||||
# ifndef strtoimax
|
||||
# define strtoimax strtol
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifndef PRIdMAX
|
||||
# if INTMAX_MAX == LLONG_MAX
|
||||
# define PRIdMAX "lld"
|
||||
# else
|
||||
# define PRIdMAX "ld"
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifndef UINT_FAST32_MAX
|
||||
typedef unsigned long uint_fast32_t;
|
||||
#endif
|
||||
|
||||
#ifndef UINT_FAST64_MAX
|
||||
# if defined ULLONG_MAX || defined __LONG_LONG_MAX__
|
||||
typedef unsigned long long uint_fast64_t;
|
||||
# else
|
||||
# if ULONG_MAX >> 31 >> 1 < 0xffffffff
|
||||
Please use a compiler that supports a 64-bit integer type (or wider);
|
||||
you may need to compile with "-DHAVE_STDINT_H".
|
||||
# endif
|
||||
typedef unsigned long uint_fast64_t;
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifndef UINTMAX_MAX
|
||||
# if defined ULLONG_MAX || defined __LONG_LONG_MAX__
|
||||
typedef unsigned long long uintmax_t;
|
||||
# else
|
||||
typedef unsigned long uintmax_t;
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifndef PRIuMAX
|
||||
# if defined ULLONG_MAX || defined __LONG_LONG_MAX__
|
||||
# define PRIuMAX "llu"
|
||||
# else
|
||||
# define PRIuMAX "lu"
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifndef INT32_MAX
|
||||
#define INT32_MAX 0x7fffffff
|
||||
# define INT32_MAX 0x7fffffff
|
||||
#endif /* !defined INT32_MAX */
|
||||
#ifndef INT32_MIN
|
||||
#define INT32_MIN (-1 - INT32_MAX)
|
||||
# define INT32_MIN (-1 - INT32_MAX)
|
||||
#endif /* !defined INT32_MIN */
|
||||
|
||||
#ifndef SIZE_MAX
|
||||
# define SIZE_MAX ((size_t) -1)
|
||||
#endif
|
||||
|
||||
#if 3 <= __GNUC__
|
||||
# define ATTRIBUTE_CONST __attribute__((const))
|
||||
# define ATTRIBUTE_MALLOC __attribute__((__malloc__))
|
||||
# define ATTRIBUTE_PURE __attribute__((__pure__))
|
||||
# define ATTRIBUTE_FORMAT(spec) __attribute__((__format__ spec))
|
||||
#else
|
||||
# define ATTRIBUTE_CONST /* empty */
|
||||
# define ATTRIBUTE_MALLOC /* empty */
|
||||
# define ATTRIBUTE_PURE /* empty */
|
||||
# define ATTRIBUTE_FORMAT(spec) /* empty */
|
||||
#endif
|
||||
|
||||
#if !defined _Noreturn && __STDC_VERSION__ < 201112
|
||||
# if 2 < __GNUC__ + (8 <= __GNUC_MINOR__)
|
||||
# define _Noreturn __attribute__((__noreturn__))
|
||||
# else
|
||||
# define _Noreturn
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if __STDC_VERSION__ < 199901 && !defined restrict
|
||||
# define restrict /* empty */
|
||||
#endif
|
||||
|
||||
/*
|
||||
** Workarounds for compilers/systems.
|
||||
*/
|
||||
|
||||
/*
|
||||
** Some time.h implementations don't declare asctime_r.
|
||||
** Others might define it as a macro.
|
||||
** Fix the former without affecting the latter.
|
||||
*/
|
||||
#ifndef EPOCH_LOCAL
|
||||
# define EPOCH_LOCAL 0
|
||||
#endif
|
||||
#ifndef EPOCH_OFFSET
|
||||
# define EPOCH_OFFSET 0
|
||||
#endif
|
||||
#ifndef RESERVE_STD_EXT_IDS
|
||||
# define RESERVE_STD_EXT_IDS 0
|
||||
#endif
|
||||
|
||||
#ifndef asctime_r
|
||||
extern char * asctime_r(struct tm const *, char *);
|
||||
/* If standard C identifiers with external linkage (e.g., localtime)
|
||||
are reserved and are not already being renamed anyway, rename them
|
||||
as if compiling with '-Dtime_tz=time_t'. */
|
||||
#if !defined time_tz && RESERVE_STD_EXT_IDS && USE_LTZ
|
||||
# define time_tz time_t
|
||||
#endif
|
||||
|
||||
/*
|
||||
** Private function declarations.
|
||||
** Compile with -Dtime_tz=T to build the tz package with a private
|
||||
** time_t type equivalent to T rather than the system-supplied time_t.
|
||||
** This debugging feature can test unusual design decisions
|
||||
** (e.g., time_t wider than 'long', or unsigned time_t) even on
|
||||
** typical platforms.
|
||||
*/
|
||||
#if defined time_tz || EPOCH_LOCAL || EPOCH_OFFSET != 0
|
||||
# define TZ_TIME_T 1
|
||||
#else
|
||||
# define TZ_TIME_T 0
|
||||
#endif
|
||||
|
||||
#if defined LOCALTIME_IMPLEMENTATION && TZ_TIME_T
|
||||
static time_t sys_time(time_t *x) { return time(x); }
|
||||
#endif
|
||||
|
||||
#if TZ_TIME_T
|
||||
|
||||
typedef time_tz tz_time_t;
|
||||
|
||||
# undef asctime
|
||||
# define asctime tz_asctime
|
||||
# undef asctime_r
|
||||
# define asctime_r tz_asctime_r
|
||||
# undef ctime
|
||||
# define ctime tz_ctime
|
||||
# undef ctime_r
|
||||
# define ctime_r tz_ctime_r
|
||||
# undef difftime
|
||||
# define difftime tz_difftime
|
||||
# undef gmtime
|
||||
# define gmtime tz_gmtime
|
||||
# undef gmtime_r
|
||||
# define gmtime_r tz_gmtime_r
|
||||
# undef localtime
|
||||
# define localtime tz_localtime
|
||||
# undef localtime_r
|
||||
# define localtime_r tz_localtime_r
|
||||
# undef localtime_rz
|
||||
# define localtime_rz tz_localtime_rz
|
||||
# undef mktime
|
||||
# define mktime tz_mktime
|
||||
# undef mktime_z
|
||||
# define mktime_z tz_mktime_z
|
||||
# undef offtime
|
||||
# define offtime tz_offtime
|
||||
# undef posix2time
|
||||
# define posix2time tz_posix2time
|
||||
# undef posix2time_z
|
||||
# define posix2time_z tz_posix2time_z
|
||||
# undef strftime
|
||||
# define strftime tz_strftime
|
||||
# undef time
|
||||
# define time tz_time
|
||||
# undef time2posix
|
||||
# define time2posix tz_time2posix
|
||||
# undef time2posix_z
|
||||
# define time2posix_z tz_time2posix_z
|
||||
# undef time_t
|
||||
# define time_t tz_time_t
|
||||
# undef timegm
|
||||
# define timegm tz_timegm
|
||||
# undef timelocal
|
||||
# define timelocal tz_timelocal
|
||||
# undef timeoff
|
||||
# define timeoff tz_timeoff
|
||||
# undef tzalloc
|
||||
# define tzalloc tz_tzalloc
|
||||
# undef tzfree
|
||||
# define tzfree tz_tzfree
|
||||
# undef tzset
|
||||
# define tzset tz_tzset
|
||||
# if HAVE_STRFTIME_L
|
||||
# undef strftime_l
|
||||
# define strftime_l tz_strftime_l
|
||||
# endif
|
||||
# if HAVE_TZNAME
|
||||
# undef tzname
|
||||
# define tzname tz_tzname
|
||||
# endif
|
||||
# if USG_COMPAT
|
||||
# undef daylight
|
||||
# define daylight tz_daylight
|
||||
# undef timezone
|
||||
# define timezone tz_timezone
|
||||
# endif
|
||||
# if ALTZONE
|
||||
# undef altzone
|
||||
# define altzone tz_altzone
|
||||
# endif
|
||||
|
||||
char *asctime(struct tm const *);
|
||||
char *asctime_r(struct tm const *restrict, char *restrict);
|
||||
char *ctime(time_t const *);
|
||||
char *ctime_r(time_t const *, char *);
|
||||
double difftime(time_t, time_t) ATTRIBUTE_CONST;
|
||||
size_t strftime(char *restrict, size_t, char const *restrict,
|
||||
struct tm const *restrict);
|
||||
# if HAVE_STRFTIME_L
|
||||
size_t strftime_l(char *restrict, size_t, char const *restrict,
|
||||
struct tm const *restrict, locale_t);
|
||||
# endif
|
||||
struct tm *gmtime(time_t const *);
|
||||
struct tm *gmtime_r(time_t const *restrict, struct tm *restrict);
|
||||
struct tm *localtime(time_t const *);
|
||||
struct tm *localtime_r(time_t const *restrict, struct tm *restrict);
|
||||
time_t mktime(struct tm *);
|
||||
time_t time(time_t *);
|
||||
void tzset(void);
|
||||
#endif
|
||||
|
||||
#if !HAVE_DECL_ASCTIME_R && !defined asctime_r
|
||||
extern char *asctime_r(struct tm const *restrict, char *restrict);
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_DECL_ENVIRON
|
||||
# if defined environ || defined __USE_GNU
|
||||
# define HAVE_DECL_ENVIRON 1
|
||||
# else
|
||||
# define HAVE_DECL_ENVIRON 0
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if !HAVE_DECL_ENVIRON
|
||||
extern char **environ;
|
||||
#endif
|
||||
|
||||
#if 2 <= HAVE_TZNAME + (TZ_TIME_T || !HAVE_POSIX_DECLS)
|
||||
extern char *tzname[];
|
||||
#endif
|
||||
#if 2 <= USG_COMPAT + (TZ_TIME_T || !HAVE_POSIX_DECLS)
|
||||
extern long timezone;
|
||||
extern int daylight;
|
||||
#endif
|
||||
#if 2 <= ALTZONE + (TZ_TIME_T || !HAVE_POSIX_DECLS)
|
||||
extern long altzone;
|
||||
#endif
|
||||
|
||||
/*
|
||||
** The STD_INSPIRED functions are similar, but most also need
|
||||
** declarations if time_tz is defined.
|
||||
*/
|
||||
|
||||
char * icalloc(int nelem, int elsize);
|
||||
char * icatalloc(char * old, const char * new);
|
||||
char * icpyalloc(const char * string);
|
||||
char * imalloc(int n);
|
||||
void * irealloc(void * pointer, int size);
|
||||
void icfree(char * pointer);
|
||||
void ifree(char * pointer);
|
||||
const char * scheck(const char * string, const char * format);
|
||||
#ifdef STD_INSPIRED
|
||||
# if TZ_TIME_T || !defined offtime
|
||||
struct tm *offtime(time_t const *, long);
|
||||
# endif
|
||||
# if TZ_TIME_T || !defined timegm
|
||||
time_t timegm(struct tm *);
|
||||
# endif
|
||||
# if TZ_TIME_T || !defined timelocal
|
||||
time_t timelocal(struct tm *);
|
||||
# endif
|
||||
# if TZ_TIME_T || !defined timeoff
|
||||
time_t timeoff(struct tm *, long);
|
||||
# endif
|
||||
# if TZ_TIME_T || !defined time2posix
|
||||
time_t time2posix(time_t);
|
||||
# endif
|
||||
# if TZ_TIME_T || !defined posix2time
|
||||
time_t posix2time(time_t);
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/* Infer TM_ZONE on systems where this information is known, but suppress
|
||||
guessing if NO_TM_ZONE is defined. Similarly for TM_GMTOFF. */
|
||||
#if (defined __GLIBC__ \
|
||||
|| defined __FreeBSD__ || defined __NetBSD__ || defined __OpenBSD__ \
|
||||
|| (defined __APPLE__ && defined __MACH__))
|
||||
# if !defined TM_GMTOFF && !defined NO_TM_GMTOFF
|
||||
# define TM_GMTOFF tm_gmtoff
|
||||
# endif
|
||||
# if !defined TM_ZONE && !defined NO_TM_ZONE
|
||||
# define TM_ZONE tm_zone
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/*
|
||||
** Define functions that are ABI compatible with NetBSD but have
|
||||
** better prototypes. NetBSD 6.1.4 defines a pointer type timezone_t
|
||||
** and labors under the misconception that 'const timezone_t' is a
|
||||
** pointer to a constant. This use of 'const' is ineffective, so it
|
||||
** is not done here. What we call 'struct state' NetBSD calls
|
||||
** 'struct __state', but this is a private name so it doesn't matter.
|
||||
*/
|
||||
#if NETBSD_INSPIRED
|
||||
typedef struct state *timezone_t;
|
||||
struct tm *localtime_rz(timezone_t restrict, time_t const *restrict,
|
||||
struct tm *restrict);
|
||||
time_t mktime_z(timezone_t restrict, struct tm *restrict);
|
||||
timezone_t tzalloc(char const *);
|
||||
void tzfree(timezone_t);
|
||||
# ifdef STD_INSPIRED
|
||||
# if TZ_TIME_T || !defined posix2time_z
|
||||
time_t posix2time_z(timezone_t, time_t) ATTRIBUTE_PURE;
|
||||
# endif
|
||||
# if TZ_TIME_T || !defined time2posix_z
|
||||
time_t time2posix_z(timezone_t, time_t) ATTRIBUTE_PURE;
|
||||
# endif
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/*
|
||||
** Finally, some convenience items.
|
||||
*/
|
||||
|
||||
#ifndef TRUE
|
||||
#define TRUE 1
|
||||
#endif /* !defined TRUE */
|
||||
#if HAVE_STDBOOL_H
|
||||
# include <stdbool.h>
|
||||
#else
|
||||
# define true 1
|
||||
# define false 0
|
||||
# define bool int
|
||||
#endif
|
||||
|
||||
#ifndef FALSE
|
||||
#define FALSE 0
|
||||
#endif /* !defined FALSE */
|
||||
|
||||
#ifndef TYPE_BIT
|
||||
#define TYPE_BIT(type) (sizeof (type) * CHAR_BIT)
|
||||
#endif /* !defined TYPE_BIT */
|
||||
|
||||
#ifndef TYPE_SIGNED
|
||||
#define TYPE_BIT(type) (sizeof(type) * CHAR_BIT)
|
||||
#define TYPE_SIGNED(type) (((type) -1) < 0)
|
||||
#endif /* !defined TYPE_SIGNED */
|
||||
#define TWOS_COMPLEMENT(t) ((t) ~ (t) 0 < 0)
|
||||
|
||||
/*
|
||||
** Since the definition of TYPE_INTEGRAL contains floating point numbers,
|
||||
** it cannot be used in preprocessor directives.
|
||||
*/
|
||||
/* Minimum and maximum of two values. Use lower case to avoid
|
||||
naming clashes with standard include files. */
|
||||
#define max(a, b) ((a) > (b) ? (a) : (b))
|
||||
#define min(a, b) ((a) < (b) ? (a) : (b))
|
||||
|
||||
#ifndef TYPE_INTEGRAL
|
||||
#define TYPE_INTEGRAL(type) (((type) 0.5) != 0.5)
|
||||
#endif /* !defined TYPE_INTEGRAL */
|
||||
/* Max and min values of the integer type T, of which only the bottom
|
||||
B bits are used, and where the highest-order used bit is considered
|
||||
to be a sign bit if T is signed. */
|
||||
#define MAXVAL(t, b) \
|
||||
((t) (((t) 1 << ((b) - 1 - TYPE_SIGNED(t))) \
|
||||
- 1 + ((t) 1 << ((b) - 1 - TYPE_SIGNED(t)))))
|
||||
#define MINVAL(t, b) \
|
||||
((t) (TYPE_SIGNED(t) ? - TWOS_COMPLEMENT(t) - MAXVAL(t, b) : 0))
|
||||
|
||||
/* The extreme time values, assuming no padding. */
|
||||
#define TIME_T_MIN_NO_PADDING MINVAL(time_t, TYPE_BIT(time_t))
|
||||
#define TIME_T_MAX_NO_PADDING MAXVAL(time_t, TYPE_BIT(time_t))
|
||||
|
||||
/* The extreme time values. These are macros, not constants, so that
|
||||
any portability problems occur only when compiling .c files that use
|
||||
the macros, which is safer for applications that need only zdump and zic.
|
||||
This implementation assumes no padding if time_t is signed and
|
||||
either the compiler lacks support for _Generic or time_t is not one
|
||||
of the standard signed integer types. */
|
||||
#if HAVE_GENERIC
|
||||
# define TIME_T_MIN \
|
||||
_Generic((time_t) 0, \
|
||||
signed char: SCHAR_MIN, short: SHRT_MIN, \
|
||||
int: INT_MIN, long: LONG_MIN, long long: LLONG_MIN, \
|
||||
default: TIME_T_MIN_NO_PADDING)
|
||||
# define TIME_T_MAX \
|
||||
(TYPE_SIGNED(time_t) \
|
||||
? _Generic((time_t) 0, \
|
||||
signed char: SCHAR_MAX, short: SHRT_MAX, \
|
||||
int: INT_MAX, long: LONG_MAX, long long: LLONG_MAX, \
|
||||
default: TIME_T_MAX_NO_PADDING) \
|
||||
: (time_t) -1)
|
||||
#else
|
||||
# define TIME_T_MIN TIME_T_MIN_NO_PADDING
|
||||
# define TIME_T_MAX TIME_T_MAX_NO_PADDING
|
||||
#endif
|
||||
|
||||
#ifndef INT_STRLEN_MAXIMUM
|
||||
/*
|
||||
** 302 / 1000 is log10(2.0) rounded up.
|
||||
** Subtract one for the sign bit if the type is signed;
|
||||
@ -220,49 +686,55 @@ const char * scheck(const char * string, const char * format);
|
||||
#define INT_STRLEN_MAXIMUM(type) \
|
||||
((TYPE_BIT(type) - TYPE_SIGNED(type)) * 302 / 1000 + \
|
||||
1 + TYPE_SIGNED(type))
|
||||
#endif /* !defined INT_STRLEN_MAXIMUM */
|
||||
|
||||
/*
|
||||
** INITIALIZE(x)
|
||||
*/
|
||||
|
||||
#ifndef GNUC_or_lint
|
||||
#ifdef lint
|
||||
#define GNUC_or_lint
|
||||
#endif /* defined lint */
|
||||
#ifndef lint
|
||||
#ifdef __GNUC__
|
||||
#define GNUC_or_lint
|
||||
#endif /* defined __GNUC__ */
|
||||
#endif /* !defined lint */
|
||||
#endif /* !defined GNUC_or_lint */
|
||||
#ifdef GCC_LINT
|
||||
# define INITIALIZE(x) ((x) = 0)
|
||||
#else
|
||||
# define INITIALIZE(x)
|
||||
#endif
|
||||
|
||||
#ifndef INITIALIZE
|
||||
#ifdef GNUC_or_lint
|
||||
#define INITIALIZE(x) ((x) = 0)
|
||||
#endif /* defined GNUC_or_lint */
|
||||
#ifndef GNUC_or_lint
|
||||
#define INITIALIZE(x)
|
||||
#endif /* !defined GNUC_or_lint */
|
||||
#endif /* !defined INITIALIZE */
|
||||
/* Whether memory access must strictly follow the C standard.
|
||||
If 0, it's OK to read uninitialized storage so long as the value is
|
||||
not relied upon. Defining it to 0 lets mktime access parts of
|
||||
struct tm that might be uninitialized, as a heuristic when the
|
||||
standard doesn't say what to return and when tm_gmtoff can help
|
||||
mktime likely infer a better value. */
|
||||
#ifndef UNINIT_TRAP
|
||||
# define UNINIT_TRAP 0
|
||||
#endif
|
||||
|
||||
#ifdef DEBUG
|
||||
# define UNREACHABLE() abort()
|
||||
#elif 4 < __GNUC__ + (5 <= __GNUC_MINOR__)
|
||||
# define UNREACHABLE() __builtin_unreachable()
|
||||
#elif defined __has_builtin
|
||||
# if __has_builtin(__builtin_unreachable)
|
||||
# define UNREACHABLE() __builtin_unreachable()
|
||||
# endif
|
||||
#endif
|
||||
#ifndef UNREACHABLE
|
||||
# define UNREACHABLE() ((void) 0)
|
||||
#endif
|
||||
|
||||
/*
|
||||
** For the benefit of GNU folk...
|
||||
** `_(MSGID)' uses the current locale's message library string for MSGID.
|
||||
** '_(MSGID)' uses the current locale's message library string for MSGID.
|
||||
** The default is to use gettext if available, and use MSGID otherwise.
|
||||
*/
|
||||
|
||||
#ifndef _
|
||||
#if HAVE_GETTEXT
|
||||
#define _(msgid) gettext(msgid)
|
||||
#else /* !HAVE_GETTEXT */
|
||||
#define _(msgid) msgid
|
||||
#endif /* !HAVE_GETTEXT */
|
||||
#endif /* !defined _ */
|
||||
|
||||
#ifndef TZ_DOMAIN
|
||||
#define TZ_DOMAIN "tz"
|
||||
#endif /* !defined TZ_DOMAIN */
|
||||
#if !defined TZ_DOMAIN && defined HAVE_GETTEXT
|
||||
# define TZ_DOMAIN "tz"
|
||||
#endif
|
||||
|
||||
#if HAVE_INCOMPATIBLE_CTIME_R
|
||||
#undef asctime_r
|
||||
@ -271,28 +743,72 @@ char *asctime_r(struct tm const *, char *);
|
||||
char *ctime_r(time_t const *, char *);
|
||||
#endif /* HAVE_INCOMPATIBLE_CTIME_R */
|
||||
|
||||
#ifndef YEARSPERREPEAT
|
||||
#define YEARSPERREPEAT 400 /* years before a Gregorian repeat */
|
||||
#endif /* !defined YEARSPERREPEAT */
|
||||
/* Handy macros that are independent of tzfile implementation. */
|
||||
|
||||
enum {
|
||||
SECSPERMIN = 60,
|
||||
MINSPERHOUR = 60,
|
||||
SECSPERHOUR = SECSPERMIN * MINSPERHOUR,
|
||||
HOURSPERDAY = 24,
|
||||
DAYSPERWEEK = 7,
|
||||
DAYSPERNYEAR = 365,
|
||||
DAYSPERLYEAR = DAYSPERNYEAR + 1,
|
||||
MONSPERYEAR = 12,
|
||||
YEARSPERREPEAT = 400 /* years before a Gregorian repeat */
|
||||
};
|
||||
|
||||
#define SECSPERDAY ((int_fast32_t) SECSPERHOUR * HOURSPERDAY)
|
||||
|
||||
#define DAYSPERREPEAT ((int_fast32_t) 400 * 365 + 100 - 4 + 1)
|
||||
#define SECSPERREPEAT ((int_fast64_t) DAYSPERREPEAT * SECSPERDAY)
|
||||
#define AVGSECSPERYEAR (SECSPERREPEAT / YEARSPERREPEAT)
|
||||
|
||||
enum {
|
||||
TM_SUNDAY,
|
||||
TM_MONDAY,
|
||||
TM_TUESDAY,
|
||||
TM_WEDNESDAY,
|
||||
TM_THURSDAY,
|
||||
TM_FRIDAY,
|
||||
TM_SATURDAY
|
||||
};
|
||||
|
||||
enum {
|
||||
TM_JANUARY,
|
||||
TM_FEBRUARY,
|
||||
TM_MARCH,
|
||||
TM_APRIL,
|
||||
TM_MAY,
|
||||
TM_JUNE,
|
||||
TM_JULY,
|
||||
TM_AUGUST,
|
||||
TM_SEPTEMBER,
|
||||
TM_OCTOBER,
|
||||
TM_NOVEMBER,
|
||||
TM_DECEMBER
|
||||
};
|
||||
|
||||
enum {
|
||||
TM_YEAR_BASE = 1900,
|
||||
TM_WDAY_BASE = TM_MONDAY,
|
||||
EPOCH_YEAR = 1970,
|
||||
EPOCH_WDAY = TM_THURSDAY
|
||||
};
|
||||
|
||||
#define isleap(y) (((y) % 4) == 0 && (((y) % 100) != 0 || ((y) % 400) == 0))
|
||||
|
||||
/*
|
||||
** The Gregorian year averages 365.2425 days, which is 31556952 seconds.
|
||||
** Since everything in isleap is modulo 400 (or a factor of 400), we know that
|
||||
** isleap(y) == isleap(y % 400)
|
||||
** and so
|
||||
** isleap(a + b) == isleap((a + b) % 400)
|
||||
** or
|
||||
** isleap(a + b) == isleap(a % 400 + b % 400)
|
||||
** This is true even if % means modulo rather than Fortran remainder
|
||||
** (which is allowed by C89 but not by C99 or later).
|
||||
** We use this to avoid addition overflow problems.
|
||||
*/
|
||||
|
||||
#ifndef AVGSECSPERYEAR
|
||||
#define AVGSECSPERYEAR 31556952L
|
||||
#endif /* !defined AVGSECSPERYEAR */
|
||||
|
||||
#ifndef SECSPERREPEAT
|
||||
#define SECSPERREPEAT ((int_fast64_t) YEARSPERREPEAT * (int_fast64_t) AVGSECSPERYEAR)
|
||||
#endif /* !defined SECSPERREPEAT */
|
||||
|
||||
#ifndef SECSPERREPEAT_BITS
|
||||
#define SECSPERREPEAT_BITS 34 /* ceil(log2(SECSPERREPEAT)) */
|
||||
#endif /* !defined SECSPERREPEAT_BITS */
|
||||
|
||||
/*
|
||||
** UNIX was a registered trademark of The Open Group in 2003.
|
||||
*/
|
||||
#define isleap_sum(a, b) isleap((a) % 400 + (b) % 400)
|
||||
|
||||
#endif /* !defined PRIVATE_H */
|
||||
|
63
scheck.c
63
scheck.c
@ -1,63 +0,0 @@
|
||||
/*
|
||||
** This file is in the public domain, so clarified as of
|
||||
** 2006-07-17 by Arthur David Olson.
|
||||
*/
|
||||
|
||||
#ifndef lint
|
||||
#ifndef NOID
|
||||
static char elsieid[] = "@(#)scheck.c 8.19";
|
||||
#endif /* !defined lint */
|
||||
#endif /* !defined NOID */
|
||||
|
||||
/*LINTLIBRARY*/
|
||||
|
||||
#include "private.h"
|
||||
|
||||
const char *
|
||||
scheck(string, format)
|
||||
const char * const string;
|
||||
const char * const format;
|
||||
{
|
||||
register char * fbuf;
|
||||
register const char * fp;
|
||||
register char * tp;
|
||||
register int c;
|
||||
register const char * result;
|
||||
char dummy;
|
||||
|
||||
result = "";
|
||||
if (string == NULL || format == NULL)
|
||||
return result;
|
||||
fbuf = imalloc((int) (2 * strlen(format) + 4));
|
||||
if (fbuf == NULL)
|
||||
return result;
|
||||
fp = format;
|
||||
tp = fbuf;
|
||||
while ((*tp++ = c = *fp++) != '\0') {
|
||||
if (c != '%')
|
||||
continue;
|
||||
if (*fp == '%') {
|
||||
*tp++ = *fp++;
|
||||
continue;
|
||||
}
|
||||
*tp++ = '*';
|
||||
if (*fp == '*')
|
||||
++fp;
|
||||
while (is_digit(*fp))
|
||||
*tp++ = *fp++;
|
||||
if (*fp == 'l' || *fp == 'h')
|
||||
*tp++ = *fp++;
|
||||
else if (*fp == '[')
|
||||
do *tp++ = *fp++;
|
||||
while (*fp != '\0' && *fp != ']');
|
||||
if ((*tp++ = *fp++) == '\0')
|
||||
break;
|
||||
}
|
||||
*(tp - 1) = '%';
|
||||
*tp++ = 'c';
|
||||
*tp = '\0';
|
||||
if (sscanf(string, fbuf, &dummy) != 1)
|
||||
result = (char *) format;
|
||||
ifree(fbuf);
|
||||
return result;
|
||||
}
|
413
strftime.c
413
strftime.c
@ -1,41 +1,47 @@
|
||||
#ifndef lint
|
||||
#ifndef NOID
|
||||
static char elsieid[] = "@(#)strftime.c 8.3";
|
||||
/* Convert a broken-down timestamp to a string. */
|
||||
|
||||
/* Copyright 1989 The Regents of the University of California.
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions
|
||||
are met:
|
||||
1. Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
2. Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
3. Neither the name of the University nor the names of its contributors
|
||||
may be used to endorse or promote products derived from this software
|
||||
without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS" AND
|
||||
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
|
||||
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
SUCH DAMAGE. */
|
||||
|
||||
/*
|
||||
** Based on the UCB version with the ID appearing below.
|
||||
** Based on the UCB version with the copyright notice appearing above.
|
||||
**
|
||||
** This is ANSIish only when "multibyte character == plain character".
|
||||
*/
|
||||
#endif /* !defined NOID */
|
||||
#endif /* !defined lint */
|
||||
|
||||
#include "private.h"
|
||||
|
||||
/*
|
||||
** Copyright (c) 1989 The Regents of the University of California.
|
||||
** All rights reserved.
|
||||
**
|
||||
** Redistribution and use in source and binary forms are permitted
|
||||
** provided that the above copyright notice and this paragraph are
|
||||
** duplicated in all such forms and that any documentation,
|
||||
** advertising materials, and other materials related to such
|
||||
** distribution and use acknowledge that the software was developed
|
||||
** by the University of California, Berkeley. The name of the
|
||||
** University may not be used to endorse or promote products derived
|
||||
** from this software without specific prior written permission.
|
||||
** THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
|
||||
** IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
|
||||
** WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
*/
|
||||
#include <fcntl.h>
|
||||
#include <locale.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#ifndef LIBC_SCCS
|
||||
#ifndef lint
|
||||
static const char sccsid[] = "@(#)strftime.c 5.4 (Berkeley) 3/14/89";
|
||||
#endif /* !defined lint */
|
||||
#endif /* !defined LIBC_SCCS */
|
||||
|
||||
#include "tzfile.h"
|
||||
#include "fcntl.h"
|
||||
#include "locale.h"
|
||||
#ifndef DEPRECATE_TWO_DIGIT_YEARS
|
||||
# define DEPRECATE_TWO_DIGIT_YEARS false
|
||||
#endif
|
||||
|
||||
struct lc_time_T {
|
||||
const char * mon[MONSPERYEAR];
|
||||
@ -50,16 +56,6 @@ struct lc_time_T {
|
||||
const char * date_fmt;
|
||||
};
|
||||
|
||||
#ifdef LOCALE_HOME
|
||||
#include "sys/stat.h"
|
||||
static struct lc_time_T localebuf;
|
||||
static struct lc_time_T * _loc(void);
|
||||
#define Locale _loc()
|
||||
#endif /* defined LOCALE_HOME */
|
||||
#ifndef LOCALE_HOME
|
||||
#define Locale (&C_time_locale)
|
||||
#endif /* !defined LOCALE_HOME */
|
||||
|
||||
static const struct lc_time_T C_time_locale = {
|
||||
{
|
||||
"Jan", "Feb", "Mar", "Apr", "May", "Jun",
|
||||
@ -80,7 +76,7 @@ static const struct lc_time_T C_time_locale = {
|
||||
|
||||
/*
|
||||
** x_fmt
|
||||
** C99 requires this format.
|
||||
** C99 and later require this format.
|
||||
** Using just numbers (as here) makes Quakers happier;
|
||||
** it's also compatible with SVR4.
|
||||
*/
|
||||
@ -88,7 +84,7 @@ static const struct lc_time_T C_time_locale = {
|
||||
|
||||
/*
|
||||
** c_fmt
|
||||
** C99 requires this format.
|
||||
** C99 and later require this format.
|
||||
** Previously this code used "%D %X", but we now conform to C99.
|
||||
** Note that
|
||||
** "%a %b %d %H:%M:%S %Y"
|
||||
@ -106,69 +102,68 @@ static const struct lc_time_T C_time_locale = {
|
||||
"%a %b %e %H:%M:%S %Z %Y"
|
||||
};
|
||||
|
||||
enum warn { IN_NONE, IN_SOME, IN_THIS, IN_ALL };
|
||||
|
||||
static char * _add(const char *, char *, const char *);
|
||||
static char * _conv(int, const char *, char *, const char *);
|
||||
static char * _fmt(const char *, const struct tm *, char *, const char *,
|
||||
int *);
|
||||
static char * _yconv(int, int, int, int, char *, const char *);
|
||||
|
||||
extern char * tzname[];
|
||||
enum warn *);
|
||||
static char * _yconv(int, int, bool, bool, char *, char const *);
|
||||
|
||||
#ifndef YEAR_2000_NAME
|
||||
#define YEAR_2000_NAME "CHECK_STRFTIME_FORMATS_FOR_TWO_DIGIT_YEARS"
|
||||
# define YEAR_2000_NAME "CHECK_STRFTIME_FORMATS_FOR_TWO_DIGIT_YEARS"
|
||||
#endif /* !defined YEAR_2000_NAME */
|
||||
|
||||
#define IN_NONE 0
|
||||
#define IN_SOME 1
|
||||
#define IN_THIS 2
|
||||
#define IN_ALL 3
|
||||
#if HAVE_STRFTIME_L
|
||||
size_t
|
||||
strftime_l(char *s, size_t maxsize, char const *format, struct tm const *t,
|
||||
locale_t locale)
|
||||
{
|
||||
/* Just call strftime, as only the C locale is supported. */
|
||||
return strftime(s, maxsize, format, t);
|
||||
}
|
||||
#endif
|
||||
|
||||
size_t
|
||||
strftime(s, maxsize, format, t)
|
||||
char * const s;
|
||||
const size_t maxsize;
|
||||
const char * const format;
|
||||
const struct tm * const t;
|
||||
strftime(char *s, size_t maxsize, const char *format, const struct tm *t)
|
||||
{
|
||||
char * p;
|
||||
int warn;
|
||||
int saved_errno = errno;
|
||||
enum warn warn = IN_NONE;
|
||||
|
||||
tzset();
|
||||
#ifdef LOCALE_HOME
|
||||
localebuf.mon[0] = 0;
|
||||
#endif /* defined LOCALE_HOME */
|
||||
warn = IN_NONE;
|
||||
p = _fmt(((format == NULL) ? "%c" : format), t, s, s + maxsize, &warn);
|
||||
#ifndef NO_RUN_TIME_WARNINGS_ABOUT_YEAR_2000_PROBLEMS_THANK_YOU
|
||||
if (warn != IN_NONE && getenv(YEAR_2000_NAME) != NULL) {
|
||||
(void) fprintf(stderr, "\n");
|
||||
if (format == NULL)
|
||||
(void) fprintf(stderr, "NULL strftime format ");
|
||||
else (void) fprintf(stderr, "strftime format \"%s\" ",
|
||||
format);
|
||||
(void) fprintf(stderr, "yields only two digits of years in ");
|
||||
if (warn == IN_SOME)
|
||||
(void) fprintf(stderr, "some locales");
|
||||
else if (warn == IN_THIS)
|
||||
(void) fprintf(stderr, "the current locale");
|
||||
else (void) fprintf(stderr, "all locales");
|
||||
(void) fprintf(stderr, "\n");
|
||||
p = _fmt(format, t, s, s + maxsize, &warn);
|
||||
if (!p) {
|
||||
errno = EOVERFLOW;
|
||||
return 0;
|
||||
}
|
||||
#endif /* !defined NO_RUN_TIME_WARNINGS_ABOUT_YEAR_2000_PROBLEMS_THANK_YOU */
|
||||
if (p == s + maxsize)
|
||||
if (DEPRECATE_TWO_DIGIT_YEARS
|
||||
&& warn != IN_NONE && getenv(YEAR_2000_NAME)) {
|
||||
fprintf(stderr, "\n");
|
||||
fprintf(stderr, "strftime format \"%s\" ", format);
|
||||
fprintf(stderr, "yields only two digits of years in ");
|
||||
if (warn == IN_SOME)
|
||||
fprintf(stderr, "some locales");
|
||||
else if (warn == IN_THIS)
|
||||
fprintf(stderr, "the current locale");
|
||||
else fprintf(stderr, "all locales");
|
||||
fprintf(stderr, "\n");
|
||||
}
|
||||
if (p == s + maxsize) {
|
||||
errno = ERANGE;
|
||||
return 0;
|
||||
}
|
||||
*p = '\0';
|
||||
errno = saved_errno;
|
||||
return p - s;
|
||||
}
|
||||
|
||||
static char *
|
||||
_fmt(format, t, pt, ptlim, warnp)
|
||||
const char * format;
|
||||
const struct tm * const t;
|
||||
char * pt;
|
||||
const char * const ptlim;
|
||||
int * warnp;
|
||||
_fmt(const char *format, const struct tm *t, char *pt,
|
||||
const char *ptlim, enum warn *warnp)
|
||||
{
|
||||
struct lc_time_T const *Locale = &C_time_locale;
|
||||
|
||||
for ( ; *format; ++format) {
|
||||
if (*format == '%') {
|
||||
label:
|
||||
@ -209,12 +204,12 @@ int * warnp;
|
||||
** something completely different.
|
||||
** (ado, 1993-05-24)
|
||||
*/
|
||||
pt = _yconv(t->tm_year, TM_YEAR_BASE, 1, 0,
|
||||
pt, ptlim);
|
||||
pt = _yconv(t->tm_year, TM_YEAR_BASE,
|
||||
true, false, pt, ptlim);
|
||||
continue;
|
||||
case 'c':
|
||||
{
|
||||
int warn2 = IN_SOME;
|
||||
enum warn warn2 = IN_SOME;
|
||||
|
||||
pt = _fmt(Locale->c_fmt, t, pt, ptlim, &warn2);
|
||||
if (warn2 == IN_ALL)
|
||||
@ -232,12 +227,12 @@ int * warnp;
|
||||
case 'E':
|
||||
case 'O':
|
||||
/*
|
||||
** C99 locale modifiers.
|
||||
** Locale modifiers of C99 and later.
|
||||
** The sequences
|
||||
** %Ec %EC %Ex %EX %Ey %EY
|
||||
** %Od %oe %OH %OI %Om %OM
|
||||
** %OS %Ou %OU %OV %Ow %OW %Oy
|
||||
** are supposed to provide alternate
|
||||
** are supposed to provide alternative
|
||||
** representations.
|
||||
*/
|
||||
goto label;
|
||||
@ -326,11 +321,17 @@ int * warnp;
|
||||
|
||||
tm = *t;
|
||||
mkt = mktime(&tm);
|
||||
if (TYPE_SIGNED(time_t))
|
||||
(void) sprintf(buf, "%ld",
|
||||
(long) mkt);
|
||||
else (void) sprintf(buf, "%lu",
|
||||
(unsigned long) mkt);
|
||||
/* There is no portable, definitive
|
||||
test for whether whether mktime
|
||||
succeeded, so treat (time_t) -1 as
|
||||
the success that it might be. */
|
||||
if (TYPE_SIGNED(time_t)) {
|
||||
intmax_t n = mkt;
|
||||
sprintf(buf, "%"PRIdMAX, n);
|
||||
} else {
|
||||
uintmax_t n = mkt;
|
||||
sprintf(buf, "%"PRIuMAX, n);
|
||||
}
|
||||
pt = _add(buf, pt, ptlim);
|
||||
}
|
||||
continue;
|
||||
@ -365,7 +366,7 @@ int * warnp;
|
||||
** (01-53)."
|
||||
** (ado, 1993-05-24)
|
||||
**
|
||||
** From "http://www.ft.uni-erlangen.de/~mskuhn/iso-time.html" by Markus Kuhn:
|
||||
** From <https://www.cl.cam.ac.uk/~mgk25/iso-time.html> by Markus Kuhn:
|
||||
** "Week 01 of a year is per definition the first week which has the
|
||||
** Thursday in this year, which is equivalent to the week which contains
|
||||
** the fourth day of January. In other words, the first week of a new year
|
||||
@ -438,9 +439,11 @@ int * warnp;
|
||||
pt, ptlim);
|
||||
else if (*format == 'g') {
|
||||
*warnp = IN_ALL;
|
||||
pt = _yconv(year, base, 0, 1,
|
||||
pt = _yconv(year, base,
|
||||
false, true,
|
||||
pt, ptlim);
|
||||
} else pt = _yconv(year, base, 1, 1,
|
||||
} else pt = _yconv(year, base,
|
||||
true, true,
|
||||
pt, ptlim);
|
||||
}
|
||||
continue;
|
||||
@ -467,7 +470,7 @@ int * warnp;
|
||||
continue;
|
||||
case 'x':
|
||||
{
|
||||
int warn2 = IN_SOME;
|
||||
enum warn warn2 = IN_SOME;
|
||||
|
||||
pt = _fmt(Locale->x_fmt, t, pt, ptlim, &warn2);
|
||||
if (warn2 == IN_ALL)
|
||||
@ -478,40 +481,42 @@ int * warnp;
|
||||
continue;
|
||||
case 'y':
|
||||
*warnp = IN_ALL;
|
||||
pt = _yconv(t->tm_year, TM_YEAR_BASE, 0, 1,
|
||||
pt = _yconv(t->tm_year, TM_YEAR_BASE,
|
||||
false, true,
|
||||
pt, ptlim);
|
||||
continue;
|
||||
case 'Y':
|
||||
pt = _yconv(t->tm_year, TM_YEAR_BASE, 1, 1,
|
||||
pt = _yconv(t->tm_year, TM_YEAR_BASE,
|
||||
true, true,
|
||||
pt, ptlim);
|
||||
continue;
|
||||
case 'Z':
|
||||
#ifdef TM_ZONE
|
||||
if (t->TM_ZONE != NULL)
|
||||
pt = _add(t->TM_ZONE, pt, ptlim);
|
||||
else
|
||||
#endif /* defined TM_ZONE */
|
||||
pt = _add(t->TM_ZONE, pt, ptlim);
|
||||
#elif HAVE_TZNAME
|
||||
if (t->tm_isdst >= 0)
|
||||
pt = _add(tzname[t->tm_isdst != 0],
|
||||
pt, ptlim);
|
||||
#endif
|
||||
/*
|
||||
** C99 says that %Z must be replaced by the
|
||||
** empty string if the time zone is not
|
||||
** C99 and later say that %Z must be
|
||||
** replaced by the empty string if the
|
||||
** time zone abbreviation is not
|
||||
** determinable.
|
||||
*/
|
||||
continue;
|
||||
case 'z':
|
||||
#if defined TM_GMTOFF || USG_COMPAT || ALTZONE
|
||||
{
|
||||
int diff;
|
||||
long diff;
|
||||
char const * sign;
|
||||
bool negative;
|
||||
|
||||
if (t->tm_isdst < 0)
|
||||
continue;
|
||||
#ifdef TM_GMTOFF
|
||||
# ifdef TM_GMTOFF
|
||||
diff = t->TM_GMTOFF;
|
||||
#else /* !defined TM_GMTOFF */
|
||||
# else
|
||||
/*
|
||||
** C99 says that the UTC offset must
|
||||
** C99 and later say that the UT offset must
|
||||
** be computed by looking only at
|
||||
** tm_isdst. This requirement is
|
||||
** incorrect, since it means the code
|
||||
@ -519,30 +524,44 @@ int * warnp;
|
||||
** altzone and timezone), and the
|
||||
** magic might not have the correct
|
||||
** offset. Doing things correctly is
|
||||
** tricky and requires disobeying C99;
|
||||
** tricky and requires disobeying the standard;
|
||||
** see GNU C strftime for details.
|
||||
** For now, punt and conform to the
|
||||
** standard, even though it's incorrect.
|
||||
**
|
||||
** C99 says that %z must be replaced by the
|
||||
** empty string if the time zone is not
|
||||
** C99 and later say that %z must be replaced by
|
||||
** the empty string if the time zone is not
|
||||
** determinable, so output nothing if the
|
||||
** appropriate variables are not available.
|
||||
*/
|
||||
if (t->tm_isdst < 0)
|
||||
continue;
|
||||
if (t->tm_isdst == 0)
|
||||
#ifdef USG_COMPAT
|
||||
# if USG_COMPAT
|
||||
diff = -timezone;
|
||||
#else /* !defined USG_COMPAT */
|
||||
# else
|
||||
continue;
|
||||
#endif /* !defined USG_COMPAT */
|
||||
# endif
|
||||
else
|
||||
#ifdef ALTZONE
|
||||
# if ALTZONE
|
||||
diff = -altzone;
|
||||
#else /* !defined ALTZONE */
|
||||
# else
|
||||
continue;
|
||||
#endif /* !defined ALTZONE */
|
||||
#endif /* !defined TM_GMTOFF */
|
||||
if (diff < 0) {
|
||||
# endif
|
||||
# endif
|
||||
negative = diff < 0;
|
||||
if (diff == 0) {
|
||||
# ifdef TM_ZONE
|
||||
negative = t->TM_ZONE[0] == '-';
|
||||
# else
|
||||
negative = t->tm_isdst < 0;
|
||||
# if HAVE_TZNAME
|
||||
if (tzname[t->tm_isdst != 0][0] == '-')
|
||||
negative = true;
|
||||
# endif
|
||||
# endif
|
||||
}
|
||||
if (negative) {
|
||||
sign = "-";
|
||||
diff = -diff;
|
||||
} else sign = "+";
|
||||
@ -552,6 +571,7 @@ int * warnp;
|
||||
(diff % MINSPERHOUR);
|
||||
pt = _conv(diff, "%04d", pt, ptlim);
|
||||
}
|
||||
#endif
|
||||
continue;
|
||||
case '+':
|
||||
pt = _fmt(Locale->date_fmt, t, pt, ptlim,
|
||||
@ -575,23 +595,16 @@ int * warnp;
|
||||
}
|
||||
|
||||
static char *
|
||||
_conv(n, format, pt, ptlim)
|
||||
const int n;
|
||||
const char * const format;
|
||||
char * const pt;
|
||||
const char * const ptlim;
|
||||
_conv(int n, const char *format, char *pt, const char *ptlim)
|
||||
{
|
||||
char buf[INT_STRLEN_MAXIMUM(int) + 1];
|
||||
|
||||
(void) sprintf(buf, format, n);
|
||||
sprintf(buf, format, n);
|
||||
return _add(buf, pt, ptlim);
|
||||
}
|
||||
|
||||
static char *
|
||||
_add(str, pt, ptlim)
|
||||
const char * str;
|
||||
char * pt;
|
||||
const char * const ptlim;
|
||||
_add(const char *str, char *pt, const char *ptlim)
|
||||
{
|
||||
while (pt < ptlim && (*pt = *str++) != '\0')
|
||||
++pt;
|
||||
@ -607,18 +620,13 @@ const char * const ptlim;
|
||||
*/
|
||||
|
||||
static char *
|
||||
_yconv(a, b, convert_top, convert_yy, pt, ptlim)
|
||||
const int a;
|
||||
const int b;
|
||||
const int convert_top;
|
||||
const int convert_yy;
|
||||
char * pt;
|
||||
const char * const ptlim;
|
||||
_yconv(int a, int b, bool convert_top, bool convert_yy,
|
||||
char *pt, const char *ptlim)
|
||||
{
|
||||
register int lead;
|
||||
register int trail;
|
||||
|
||||
#define DIVISOR 100
|
||||
int DIVISOR = 100;
|
||||
trail = a % DIVISOR + b % DIVISOR;
|
||||
lead = a / DIVISOR + b / DIVISOR + trail / DIVISOR;
|
||||
trail %= DIVISOR;
|
||||
@ -638,124 +646,3 @@ const char * const ptlim;
|
||||
pt = _conv(((trail < 0) ? -trail : trail), "%02d", pt, ptlim);
|
||||
return pt;
|
||||
}
|
||||
|
||||
#ifdef LOCALE_HOME
|
||||
static struct lc_time_T *
|
||||
_loc(void)
|
||||
{
|
||||
static const char locale_home[] = LOCALE_HOME;
|
||||
static const char lc_time[] = "LC_TIME";
|
||||
static char * locale_buf;
|
||||
|
||||
int fd;
|
||||
int oldsun; /* "...ain't got nothin' to do..." */
|
||||
char * lbuf;
|
||||
char * name;
|
||||
char * p;
|
||||
const char ** ap;
|
||||
const char * plim;
|
||||
char filename[FILENAME_MAX];
|
||||
struct stat st;
|
||||
size_t namesize;
|
||||
size_t bufsize;
|
||||
|
||||
/*
|
||||
** Use localebuf.mon[0] to signal whether locale is already set up.
|
||||
*/
|
||||
if (localebuf.mon[0])
|
||||
return &localebuf;
|
||||
name = setlocale(LC_TIME, (char *) NULL);
|
||||
if (name == NULL || *name == '\0')
|
||||
goto no_locale;
|
||||
/*
|
||||
** If the locale name is the same as our cache, use the cache.
|
||||
*/
|
||||
lbuf = locale_buf;
|
||||
if (lbuf != NULL && strcmp(name, lbuf) == 0) {
|
||||
p = lbuf;
|
||||
for (ap = (const char **) &localebuf;
|
||||
ap < (const char **) (&localebuf + 1);
|
||||
++ap)
|
||||
*ap = p += strlen(p) + 1;
|
||||
return &localebuf;
|
||||
}
|
||||
/*
|
||||
** Slurp the locale file into the cache.
|
||||
*/
|
||||
namesize = strlen(name) + 1;
|
||||
if (sizeof filename <
|
||||
((sizeof locale_home) + namesize + (sizeof lc_time)))
|
||||
goto no_locale;
|
||||
oldsun = 0;
|
||||
(void) sprintf(filename, "%s/%s/%s", locale_home, name, lc_time);
|
||||
fd = open(filename, O_RDONLY);
|
||||
if (fd < 0) {
|
||||
/*
|
||||
** Old Sun systems have a different naming and data convention.
|
||||
*/
|
||||
oldsun = 1;
|
||||
(void) sprintf(filename, "%s/%s/%s", locale_home,
|
||||
lc_time, name);
|
||||
fd = open(filename, O_RDONLY);
|
||||
if (fd < 0)
|
||||
goto no_locale;
|
||||
}
|
||||
if (fstat(fd, &st) != 0)
|
||||
goto bad_locale;
|
||||
if (st.st_size <= 0)
|
||||
goto bad_locale;
|
||||
bufsize = namesize + st.st_size;
|
||||
locale_buf = NULL;
|
||||
lbuf = (lbuf == NULL) ? malloc(bufsize) : realloc(lbuf, bufsize);
|
||||
if (lbuf == NULL)
|
||||
goto bad_locale;
|
||||
(void) strcpy(lbuf, name);
|
||||
p = lbuf + namesize;
|
||||
plim = p + st.st_size;
|
||||
if (read(fd, p, (size_t) st.st_size) != st.st_size)
|
||||
goto bad_lbuf;
|
||||
if (close(fd) != 0)
|
||||
goto bad_lbuf;
|
||||
/*
|
||||
** Parse the locale file into localebuf.
|
||||
*/
|
||||
if (plim[-1] != '\n')
|
||||
goto bad_lbuf;
|
||||
for (ap = (const char **) &localebuf;
|
||||
ap < (const char **) (&localebuf + 1);
|
||||
++ap) {
|
||||
if (p == plim)
|
||||
goto bad_lbuf;
|
||||
*ap = p;
|
||||
while (*p != '\n')
|
||||
++p;
|
||||
*p++ = '\0';
|
||||
}
|
||||
if (oldsun) {
|
||||
/*
|
||||
** SunOS 4 used an obsolescent format; see localdtconv(3).
|
||||
** c_fmt had the ``short format for dates and times together''
|
||||
** (SunOS 4 date, "%a %b %e %T %Z %Y" in the C locale);
|
||||
** date_fmt had the ``long format for dates''
|
||||
** (SunOS 4 strftime %C, "%A, %B %e, %Y" in the C locale).
|
||||
** Discard the latter in favor of the former.
|
||||
*/
|
||||
localebuf.date_fmt = localebuf.c_fmt;
|
||||
}
|
||||
/*
|
||||
** Record the successful parse in the cache.
|
||||
*/
|
||||
locale_buf = lbuf;
|
||||
|
||||
return &localebuf;
|
||||
|
||||
bad_lbuf:
|
||||
free(lbuf);
|
||||
bad_locale:
|
||||
(void) close(fd);
|
||||
no_locale:
|
||||
localebuf = C_time_locale;
|
||||
locale_buf = NULL;
|
||||
return &localebuf;
|
||||
}
|
||||
#endif /* defined LOCALE_HOME */
|
||||
|
1479
theory.html
Normal file
1479
theory.html
Normal file
File diff suppressed because it is too large
Load Diff
56
time2posix.3
56
time2posix.3
@ -3,23 +3,30 @@
|
||||
time2posix, posix2time \- convert seconds since the Epoch
|
||||
.SH SYNOPSIS
|
||||
.nf
|
||||
.B #include <sys/types.h>
|
||||
.ie \n(.g .ds - \f(CW-\fP
|
||||
.el .ds - \-
|
||||
.B #include <time.h>
|
||||
.PP
|
||||
.B time_t time2posix(t)
|
||||
.B time_t t
|
||||
.B time_t time2posix(time_t t);
|
||||
.PP
|
||||
.B time_t posix2time(t)
|
||||
.B time_t t
|
||||
.B time_t posix2time(time_t t);
|
||||
.PP
|
||||
.B cc ... -ltz
|
||||
.B cc ... \*-ltz
|
||||
.fi
|
||||
.SH DESCRIPTION
|
||||
.ie '\(en'' .ds en \-
|
||||
.el .ds en \(en
|
||||
.ie '\(lq'' .ds lq \&"\"
|
||||
.el .ds lq \(lq\"
|
||||
.ie '\(rq'' .ds rq \&"\"
|
||||
.el .ds rq \(rq\"
|
||||
.de q
|
||||
\\$3\*(lq\\$1\*(rq\\$2
|
||||
..
|
||||
IEEE Standard 1003.1
|
||||
(POSIX)
|
||||
legislates that a time_t value of
|
||||
536457599 shall correspond to "Wed Dec 31 23:59:59 UTC 1986."
|
||||
This effectively implies that POSIX time_t's cannot include leap
|
||||
requires the time_t value 536457599 to stand for 1986-12-31 23:59:59 UTC.
|
||||
This effectively implies that POSIX time_t values cannot include leap
|
||||
seconds and,
|
||||
therefore,
|
||||
that the system time must be adjusted as each leap occurs.
|
||||
@ -29,20 +36,22 @@ enabled,
|
||||
however,
|
||||
no such adjustment is needed and
|
||||
time_t values continue to increase over leap events
|
||||
(as a true `seconds since...' value).
|
||||
(as a true
|
||||
.q "seconds since...\&"
|
||||
value).
|
||||
This means that these values will differ from those required by POSIX
|
||||
by the net number of leap seconds inserted since the Epoch.
|
||||
.PP
|
||||
Typically this is not a problem as the type time_t is intended
|
||||
to be
|
||||
(mostly)
|
||||
opaque\(emtime_t values should only be obtained-from and
|
||||
opaque \*(en time_t values should only be obtained-from and
|
||||
passed-to functions such as
|
||||
.IR time(2) ,
|
||||
.IR localtime(3) ,
|
||||
.IR mktime(3) ,
|
||||
.BR time(2) ,
|
||||
.BR localtime(3) ,
|
||||
.BR mktime(3) ,
|
||||
and
|
||||
.IR difftime(3) .
|
||||
.BR difftime(3) .
|
||||
However,
|
||||
POSIX gives an arithmetic
|
||||
expression for directly computing a time_t value from a given date/time,
|
||||
@ -54,9 +63,9 @@ using such a relationship will typically not handle intervals
|
||||
over leap seconds correctly.
|
||||
.PP
|
||||
The
|
||||
.I time2posix
|
||||
.B time2posix
|
||||
and
|
||||
.I posix2time
|
||||
.B posix2time
|
||||
functions are provided to address this time_t mismatch by converting
|
||||
between local time_t values and their POSIX equivalents.
|
||||
This is done by accounting for the number of time-base changes that
|
||||
@ -66,12 +75,16 @@ These converted values can then be used in lieu of correcting the older
|
||||
applications,
|
||||
or when communicating with POSIX-compliant systems.
|
||||
.PP
|
||||
.I Time2posix
|
||||
The
|
||||
.B time2posix
|
||||
function
|
||||
is single-valued.
|
||||
That is,
|
||||
every local time_t
|
||||
corresponds to a single POSIX time_t.
|
||||
.I Posix2time
|
||||
The
|
||||
.B posix2time
|
||||
function
|
||||
is less well-behaved:
|
||||
for a positive leap second hit the result is not unique,
|
||||
and for a negative leap second hit the corresponding
|
||||
@ -107,15 +120,14 @@ If leap-second support is not enabled,
|
||||
local time_t's and
|
||||
POSIX time_t's are equivalent,
|
||||
and both
|
||||
.I time2posix
|
||||
.B time2posix
|
||||
and
|
||||
.I posix2time
|
||||
.B posix2time
|
||||
degenerate to the identity function.
|
||||
.SH SEE ALSO
|
||||
difftime(3),
|
||||
localtime(3),
|
||||
mktime(3),
|
||||
time(2)
|
||||
.\" @(#)time2posix.3 8.2
|
||||
.\" This file is in the public domain, so clarified as of
|
||||
.\" 1996-06-05 by Arthur David Olson.
|
||||
|
121
time2posix.3.txt
121
time2posix.3.txt
@ -1,83 +1,76 @@
|
||||
NAME
|
||||
TIME2POSIX(3) Library Functions Manual TIME2POSIX(3)
|
||||
|
||||
time2posix, posix2time - convert seconds since the Epoch
|
||||
NAME
|
||||
time2posix, posix2time - convert seconds since the Epoch
|
||||
|
||||
SYNOPSIS
|
||||
#include <sys/types.h>
|
||||
#include <time.h>
|
||||
#include <time.h>
|
||||
|
||||
time_t time2posix(t)
|
||||
time_t t
|
||||
time_t time2posix(time_t t);
|
||||
|
||||
time_t posix2time(t)
|
||||
time_t t
|
||||
time_t posix2time(time_t t);
|
||||
|
||||
cc ... -ltz
|
||||
cc ... -ltz
|
||||
|
||||
DESCRIPTION
|
||||
IEEE Standard 1003.1 (POSIX) legislates that a time_t value
|
||||
of 536457599 shall correspond to "Wed Dec 31 23:59:59 UTC
|
||||
1986." This effectively implies that POSIX time_t's cannot
|
||||
include leap seconds and, therefore, that the system time
|
||||
must be adjusted as each leap occurs.
|
||||
IEEE Standard 1003.1 (POSIX) requires the time_t value 536457599 to
|
||||
stand for 1986-12-31 23:59:59 UTC. This effectively implies that POSIX
|
||||
time_t values cannot include leap seconds and, therefore, that the
|
||||
system time must be adjusted as each leap occurs.
|
||||
|
||||
If the time package is configured with leap-second support
|
||||
enabled, however, no such adjustment is needed and time_t
|
||||
values continue to increase over leap events (as a true
|
||||
`seconds since...' value). This means that these values
|
||||
will differ from those required by POSIX by the net number
|
||||
of leap seconds inserted since the Epoch.
|
||||
If the time package is configured with leap-second support enabled,
|
||||
however, no such adjustment is needed and time_t values continue to
|
||||
increase over leap events (as a true "seconds since..." value). This
|
||||
means that these values will differ from those required by POSIX by the
|
||||
net number of leap seconds inserted since the Epoch.
|
||||
|
||||
Typically this is not a problem as the type time_t is
|
||||
intended to be (mostly) opaque--time_t values should only be
|
||||
obtained-from and passed-to functions such as time(2),
|
||||
localtime(3), mktime(3), and difftime(3). However, POSIX
|
||||
gives an arithmetic expression for directly computing a
|
||||
time_t value from a given date/time, and the same
|
||||
relationship is assumed by some (usually older)
|
||||
applications. Any programs creating/dissecting time_t's
|
||||
using such a relationship will typically not handle
|
||||
intervals over leap seconds correctly.
|
||||
Typically this is not a problem as the type time_t is intended to be
|
||||
(mostly) opaque - time_t values should only be obtained-from and
|
||||
passed-to functions such as time(2), localtime(3), mktime(3), and
|
||||
difftime(3). However, POSIX gives an arithmetic expression for
|
||||
directly computing a time_t value from a given date/time, and the same
|
||||
relationship is assumed by some (usually older) applications. Any
|
||||
programs creating/dissecting time_t's using such a relationship will
|
||||
typically not handle intervals over leap seconds correctly.
|
||||
|
||||
The time2posix and posix2time functions are provided to
|
||||
address this time_t mismatch by converting between local
|
||||
time_t values and their POSIX equivalents. This is done by
|
||||
accounting for the number of time-base changes that would
|
||||
have taken place on a POSIX system as leap seconds were
|
||||
inserted or deleted. These converted values can then be
|
||||
used in lieu of correcting the older applications, or when
|
||||
communicating with POSIX-compliant systems.
|
||||
The time2posix and posix2time functions are provided to address this
|
||||
time_t mismatch by converting between local time_t values and their
|
||||
POSIX equivalents. This is done by accounting for the number of time-
|
||||
base changes that would have taken place on a POSIX system as leap
|
||||
seconds were inserted or deleted. These converted values can then be
|
||||
used in lieu of correcting the older applications, or when
|
||||
communicating with POSIX-compliant systems.
|
||||
|
||||
Time2posix is single-valued. That is, every local time_t
|
||||
corresponds to a single POSIX time_t. Posix2time is less
|
||||
well-behaved: for a positive leap second hit the result is
|
||||
not unique, and for a negative leap second hit the
|
||||
corresponding POSIX time_t doesn't exist so an adjacent
|
||||
value is returned. Both of these are good indicators of the
|
||||
inferiority of the POSIX representation.
|
||||
The time2posix function is single-valued. That is, every local time_t
|
||||
corresponds to a single POSIX time_t. The posix2time function is less
|
||||
well-behaved: for a positive leap second hit the result is not unique,
|
||||
and for a negative leap second hit the corresponding POSIX time_t
|
||||
doesn't exist so an adjacent value is returned. Both of these are good
|
||||
indicators of the inferiority of the POSIX representation.
|
||||
|
||||
The following table summarizes the relationship between a
|
||||
time T and it's conversion to, and back from, the POSIX
|
||||
representation over the leap second inserted at the end of
|
||||
June, 1993.
|
||||
DATE TIME T X=time2posix(T) posix2time(X)
|
||||
93/06/30 23:59:59 A+0 B+0 A+0
|
||||
93/06/30 23:59:60 A+1 B+1 A+1 or A+2
|
||||
93/07/01 00:00:00 A+2 B+1 A+1 or A+2
|
||||
93/07/01 00:00:01 A+3 B+2 A+3
|
||||
The following table summarizes the relationship between a time T and
|
||||
it's conversion to, and back from, the POSIX representation over the
|
||||
leap second inserted at the end of June, 1993.
|
||||
DATE TIME T X=time2posix(T) posix2time(X)
|
||||
93/06/30 23:59:59 A+0 B+0 A+0
|
||||
93/06/30 23:59:60 A+1 B+1 A+1 or A+2
|
||||
93/07/01 00:00:00 A+2 B+1 A+1 or A+2
|
||||
93/07/01 00:00:01 A+3 B+2 A+3
|
||||
|
||||
A leap second deletion would look like...
|
||||
A leap second deletion would look like...
|
||||
|
||||
DATE TIME T X=time2posix(T) posix2time(X)
|
||||
??/06/30 23:59:58 A+0 B+0 A+0
|
||||
??/07/01 00:00:00 A+1 B+2 A+1
|
||||
??/07/01 00:00:01 A+2 B+3 A+2
|
||||
DATE TIME T X=time2posix(T) posix2time(X)
|
||||
??/06/30 23:59:58 A+0 B+0 A+0
|
||||
??/07/01 00:00:00 A+1 B+2 A+1
|
||||
??/07/01 00:00:01 A+2 B+3 A+2
|
||||
|
||||
[Note: posix2time(B+1) => A+0 or A+1]
|
||||
[Note: posix2time(B+1) => A+0 or A+1]
|
||||
|
||||
If leap-second support is not enabled, local time_t's and
|
||||
POSIX time_t's are equivalent, and both time2posix and
|
||||
posix2time degenerate to the identity function.
|
||||
If leap-second support is not enabled, local time_t's and POSIX
|
||||
time_t's are equivalent, and both time2posix and posix2time degenerate
|
||||
to the identity function.
|
||||
|
||||
SEE ALSO
|
||||
difftime(3), localtime(3), mktime(3), time(2)
|
||||
difftime(3), localtime(3), mktime(3), time(2)
|
||||
|
||||
TIME2POSIX(3)
|
||||
|
472
tz-art.htm
472
tz-art.htm
@ -1,472 +0,0 @@
|
||||
<!DOCTYPE html
|
||||
PUBLIC "-//W3C//DTD HTML 4.01//EN"
|
||||
"http://www.w3.org/TR/html4/strict.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-type" content='text/html; charset="US-ASCII"'>
|
||||
<title>Time and the Arts</title>
|
||||
</head>
|
||||
<body>
|
||||
<h1>Time and the Arts</h1>
|
||||
<address>
|
||||
@(#)tz-art.htm 8.17
|
||||
</address>
|
||||
<p>
|
||||
This file is in the public domain, so clarified as of
|
||||
2009-05-17 by Arthur David Olson.
|
||||
</p>
|
||||
<p>
|
||||
Please send corrections to this web page to the
|
||||
<a href="mailto:tz@elsie.nci.nih.gov">time zone mailing list</a>.</p>
|
||||
<p>
|
||||
See also <a href="tz-link.htm">Sources for Time Zone and Daylight Saving Time Data</a>.</p>
|
||||
<hr>
|
||||
<p>
|
||||
Data on recordings of "Save That Time," Russ Long, Serrob Publishing, BMI:</p>
|
||||
<table>
|
||||
<tr><td>Artist</td><td>Karrin Allyson</td></tr>
|
||||
<tr><td>CD</td><td>I Didn't Know About You</td></tr>
|
||||
<tr><td>Copyright Date</td><td>1993</td></tr>
|
||||
<tr><td>Label</td><td>Concord Jazz, Inc.</td></tr>
|
||||
<tr><td>ID</td><td>CCD-4543</td></tr>
|
||||
<tr><td>Track Time</td><td>3:44</td></tr>
|
||||
<tr><td>Personnel</td><td>Karrin Allyson, vocal;
|
||||
Russ Long, piano;
|
||||
Gerald Spaits, bass;
|
||||
Todd Strait, drums</td></tr>
|
||||
<tr><td>Notes</td><td>CD notes "additional lyric by Karrin Allyson;
|
||||
arranged by Russ Long and Karrin Allyson"</td></tr>
|
||||
<tr><td>ADO Rating</td><td>1 star</td></tr>
|
||||
<tr><td><a href="http://www.allmusic.com/cg/amg.dll?p=amg&sql=A1fdovw9ta92k">AMG Rating</a></td><td>4 stars</td></tr>
|
||||
<tr><td>Penguin Rating</td><td>3.5 stars</td></tr>
|
||||
<tr><td> </td></tr>
|
||||
<tr><td>Artist</td><td>Kevin Mahogany</td></tr>
|
||||
<tr><td>CD</td><td>Double Rainbow</td></tr>
|
||||
<tr><td>Copyright Date</td><td>1993</td></tr>
|
||||
<tr><td>Label</td><td>Enja Records</td></tr>
|
||||
<tr><td>ID</td><td>ENJ-7097 2</td></tr>
|
||||
<tr><td>Track Time</td><td>6:27</td></tr>
|
||||
<tr><td>Personnel</td><td>Kevin Mahogany, vocal;
|
||||
Kenny Barron, piano;
|
||||
Ray Drummond, bass;
|
||||
Ralph Moore, tenor saxophone;
|
||||
Lewis Nash, drums</td></tr>
|
||||
<tr><td>ADO Rating</td><td>1.5 stars</td></tr>
|
||||
<tr><td><a href="http://www.allmusic.com/cg/amg.dll?p=amg&sql=Akikbikzjbb19">AMG Rating</a></td><td>3 stars</td></tr>
|
||||
<tr><td>Penguin Rating</td><td>3 stars</td></tr>
|
||||
<tr><td> </td></tr>
|
||||
<tr><td>Artist</td><td>Joe Williams</td></tr>
|
||||
<tr><td>CD</td><td>Here's to Life</td></tr>
|
||||
<tr><td>Copyright Date</td><td>1994</td></tr>
|
||||
<tr><td>Label</td><td>Telarc International Corporation</td></tr>
|
||||
<tr><td>ID</td><td>CD-83357</td></tr>
|
||||
<tr><td>Track Time</td><td>3:58</td></tr>
|
||||
<tr><td>Personnel</td><td>Joe Williams, vocal
|
||||
The Robert Farnon [39 piece] Orchestra</td></tr>
|
||||
<tr><td>Notes</td><td>This CD is also available as part of a 3-CD package from
|
||||
Telarc, "Triple Play" (CD-83461)</td></tr>
|
||||
<tr><td>ADO Rating</td><td>black dot</td></tr>
|
||||
<tr><td><a href="http://www.allmusic.com/cg/amg.dll?p=amg&sql=Amyyvad6kt8w1">AMG Rating</a></td><td>2 stars</td></tr>
|
||||
<tr><td>Penguin Rating</td><td>3 stars</td></tr>
|
||||
<tr><td> </td></tr>
|
||||
<tr><td>Artist</td><td>Charles Fambrough</td></tr>
|
||||
<tr><td>CD</td><td>Keeper of the Spirit</td></tr>
|
||||
<tr><td>Copyright Date</td><td>1995</td></tr>
|
||||
<tr><td>Label</td><td>AudioQuest Music</td></tr>
|
||||
<tr><td>ID</td><td>AQ-CD1033</td></tr>
|
||||
<tr><td>Track Time</td><td>7:07</td></tr>
|
||||
<tr><td>Personnel</td><td>Charles Fambrough, bass;
|
||||
Joel Levine, tenor recorder;
|
||||
Edward Simon, piano;
|
||||
Lenny White, drums;
|
||||
Marion Simon, percussion</td></tr>
|
||||
<tr><td>Notes</td><td>On-line information and samples available at
|
||||
<a href="http://wwmusic.com/~music/audioq/rel/1033.html">http://wwmusic.com/~music/audioq/rel/1033.html</a></td></tr>
|
||||
<tr><td>ADO Rating</td><td>2 stars</td></tr>
|
||||
<tr><td><a href="http://www.allmusic.com/cg/amg.dll?p=amg&sql=A5rkcikcjbb89">AMG Rating</a></td><td>unrated</td></tr>
|
||||
<tr><td>Penguin Rating</td><td>3 stars</td></tr>
|
||||
</table>
|
||||
<hr>
|
||||
<p>Also of note:</p>
|
||||
<table>
|
||||
<tr><td>Artist</td><td>Holly Cole Trio</td></tr>
|
||||
<tr><td>CD</td><td>Blame It On My Youth</td></tr>
|
||||
<tr><td>Copyright Date</td><td>1992</td></tr>
|
||||
<tr><td>Label</td><td>Manhattan</td></tr>
|
||||
<tr><td>ID</td><td>CDP 7 97349 2</td></tr>
|
||||
<tr><td>Total Time</td><td>37:45</td></tr>
|
||||
<tr><td>Personnel</td><td>Holly Cole, voice;
|
||||
Aaron Davis, piano;
|
||||
David Piltch, string bass</td></tr>
|
||||
<tr><td>Notes</td><td>Lyrical reference to "Eastern Standard Time" in
|
||||
Tom Waits' "Purple Avenue"</td></tr>
|
||||
<tr><td>ADO Rating</td><td>2.5 stars</td></tr>
|
||||
<tr><td><a href="http://www.allmusic.com/cg/amg.dll?p=amg&sql=A3a9ds37ya3dg">AMG Rating</a></td><td>3 stars</td></tr>
|
||||
<tr><td>Penguin Rating</td><td>unrated</td></tr>
|
||||
<tr><td> </td></tr>
|
||||
<tr><td>Artist</td><td>Milt Hinton</td></tr>
|
||||
<tr><td>CD</td><td>Old Man Time</td></tr>
|
||||
<tr><td>Copyright Date</td><td>1990</td></tr>
|
||||
<tr><td>Label</td><td>Chiaroscuro</td></tr>
|
||||
<tr><td>ID</td><td>CR(D) 310</td></tr>
|
||||
<tr><td>Total Time</td><td>149:38 (two CDs)</td></tr>
|
||||
<tr><td>Personnel</td><td>Milt Hinton, bass;
|
||||
Doc Cheatham, Dizzy Gillespie, Clark Terry, trumpet;
|
||||
Al Grey, trombone;
|
||||
Eddie Barefield, Joe Camel (Flip Phillips), Buddy Tate,
|
||||
clarinet and saxophone;
|
||||
John Bunch, Red Richards, Norman Simmons, Derek Smith,
|
||||
Ralph Sutton, piano;
|
||||
Danny Barker, Al Casey, guitar;
|
||||
Gus Johnson, Gerryck King, Bob Rosengarden, Jackie Williams,
|
||||
drums;
|
||||
Lionel Hampton, vibraphone;
|
||||
Cab Calloway, Joe Williams, vocal;
|
||||
Buck Clayton, arrangements</td></tr>
|
||||
<tr><td>Notes</td><td>tunes include Old Man Time, Time After Time,
|
||||
Sometimes I'm Happy,
|
||||
A Hot Time in the Old Town Tonight,
|
||||
Four or Five Times, Now's the Time,
|
||||
Time on My Hands, This Time It's Us,
|
||||
and Good Time Charlie
|
||||
On-line samples available at
|
||||
<a href="http://www.chiaroscurojazz.com/albuminfo.php4?albumid=49">http://www.chiaroscurojazz.com/albuminfo.php3?albumid=49</a></td></tr>
|
||||
<tr><td>ADO Rating</td><td>3 stars</td></tr>
|
||||
<tr><td><a href="http://www.allmusic.com/cg/amg.dll?p=amg&sql=A1cbyxdab8ola">AMG Rating</a></td><td>4.5 stars</td></tr>
|
||||
<tr><td>Penguin Rating</td><td>3 stars</td></tr>
|
||||
<tr><td> </td></tr>
|
||||
<tr><td>Artist</td><td>Alan Broadbent</td></tr>
|
||||
<tr><td>CD</td><td>Pacific Standard Time</td></tr>
|
||||
<tr><td>Copyright Date</td><td>1995</td></tr>
|
||||
<tr><td>Label</td><td>Concord Jazz, Inc.</td></tr>
|
||||
<tr><td>ID</td><td>CCD-4664</td></tr>
|
||||
<tr><td>Total Time</td><td>62:42</td></tr>
|
||||
<tr><td>Personnel</td><td>Alan Broadbent, piano;
|
||||
Putter Smith, Bass;
|
||||
Frank Gibson, Jr., drums</td></tr>
|
||||
<tr><td>Notes</td><td>The CD cover features an analemma for equation-of-time fans</td></tr>
|
||||
<tr><td>ADO Rating</td><td>1 star</td></tr>
|
||||
<tr><td><a href="http://www.allmusic.com/cg/amg.dll?p=amg&sql=Asl8zefuk8gfo">AMG Rating</a></td><td>4 stars</td></tr>
|
||||
<tr><td>Penguin Rating</td><td>3.5 stars</td></tr>
|
||||
<tr><td> </td></tr>
|
||||
<tr><td>Artist</td><td>Anthony Braxton/Richard Teitelbaum</td></tr>
|
||||
<tr><td>CD</td><td>Silence/Time Zones</td></tr>
|
||||
<tr><td>Copyright Date</td><td>1996</td></tr>
|
||||
<tr><td>Label</td><td>Black Lion</td></tr>
|
||||
<tr><td>ID</td><td>BLCD 760221</td></tr>
|
||||
<tr><td>Total Time</td><td>72:58</td></tr>
|
||||
<tr><td>Personnel</td><td>Anthony Braxton, sopranino and alto saxophones,
|
||||
contrebasse clarinet, miscellaneous instruments;
|
||||
Leo Smith, trumpet and miscellaneous instruments;
|
||||
Leroy Jenkins, violin and miscellaneous instruments;
|
||||
Richard Teitelbaum, modular moog and micromoog synthesizer</td></tr>
|
||||
<tr><td>ADO Rating</td><td>black dot</td></tr>
|
||||
<tr><td><a href="http://www.allmusic.com/cg/amg.dll?p=amg&sql=A5bkvu3xjan1k">AMG Rating</a></td><td>unrated</td></tr>
|
||||
<tr><td> </td></tr>
|
||||
<tr><td>Artist</td><td>Charles Gayle</td></tr>
|
||||
<tr><td>CD</td><td>Time Zones</td></tr>
|
||||
<tr><td>Copyright Date</td><td>2006</td></tr>
|
||||
<tr><td>Label</td><td>Tompkins Square</td></tr>
|
||||
<tr><td>ID</td><td>TSQ2839</td></tr>
|
||||
<tr><td>Total Time</td><td>49:06</td></tr>
|
||||
<tr><td>Personnel</td><td>Charles Gayle, piano</td></tr>
|
||||
<tr><td>ADO Rating</td><td>1 star</td></tr>
|
||||
<tr><td><a href="http://www.allmusic.com/cg/amg.dll?p=amg&sql=10:13rc28vw054a">AMG Rating</a></td><td>4.5 stars</td></tr>
|
||||
<tr><td> </td></tr>
|
||||
<tr><td>Artist</td><td>The Get Up Kids</td></tr>
|
||||
<tr><td>CD</td><td>Eudora</td></tr>
|
||||
<tr><td>Copyright Date</td><td>2001</td></tr>
|
||||
<tr><td>Label</td><td>Vagrant</td></tr>
|
||||
<tr><td>ID</td><td>357</td></tr>
|
||||
<tr><td>Total Time</td><td>65:12</td></tr>
|
||||
<tr><td>Notes</td><td>Includes the song "Central Standard Time." Thanks to Colin Bowern for this information.</td></tr>
|
||||
<tr><td><a href="http://www.allmusic.com/cg/amg.dll?p=amg&sql=10:7ddovwvla9xk">AMG Rating</a></td><td>2.5 stars</td></tr>
|
||||
<tr><td> </td></tr>
|
||||
|
||||
<tr><td>Artist</td><td>Coldplay</td></tr>
|
||||
<tr><td>Song</td><td>Clocks</td></tr>
|
||||
<tr><td>Copyright Date</td><td>2003</td></tr>
|
||||
<tr><td>Label</td><td>Capitol Records</td></tr>
|
||||
<tr><td>ID</td><td>52608</td></tr>
|
||||
<tr><td>Total Time</td><td>4:13</td></tr>
|
||||
<tr><td>Notes</td><td>Won the 2004 Record of the Year honor at the
|
||||
Grammy Awards. Co-written and performed by Chris Martin,
|
||||
great-great-grandson of DST inventor William Willett. The song's first
|
||||
line is "Lights go out and I can't be saved".</td></tr>
|
||||
<tr><td> </td></tr>
|
||||
|
||||
<tr><td>Artist</td><td>Irving Kahal and Harry Richman</td></tr>
|
||||
<tr><td>Song</td><td>There Ought to be a Moonlight Saving Time</td></tr>
|
||||
<tr><td>Copyright Date</td><td>1931</td>
|
||||
<tr><td>Notes</td><td>This musical standard was a #1 hit for Guy Lombardo
|
||||
in 1931, and was also performed by Maurice Chevalier, Blossom Dearie
|
||||
and many others. The phrase "Moonlight saving time" also appears in
|
||||
the 1995 country song "Not Enough Hours in the Night" written by Aaron
|
||||
Barker, Kim Williams and Rob Harbin and performed by Doug
|
||||
Supernaw.</td></tr>
|
||||
<tr><td> </td></tr>
|
||||
|
||||
<tr><td>Artist</td><td>The Microscopic Septet</td></tr>
|
||||
<tr><td>CD</td><td>Lobster Leaps In</td></tr>
|
||||
<tr><td>Copyright Date</td><td>2008</td></tr>
|
||||
<tr><td>Label</td><td>Cuneiform</td></tr>
|
||||
<tr><td>ID</td><td>272</td></tr>
|
||||
<tr><td>Total Time</td><td>73:05</td></tr>
|
||||
<tr><td>Notes</td><td>Includes the song "Twilight Time Zone."</td></tr>
|
||||
<tr><td><a href="http://www.allmusic.com/cg/amg.dll?p=amg&sql=10:w9fpxzykldje">AMG Rating</a></td><td>3.5 stars</td></tr>
|
||||
<tr><td>ADO Rating</td><td>2 stars</td></tr>
|
||||
|
||||
<tr><td> </td></tr>
|
||||
|
||||
<tr><td>Artist</td><td>Bob Dylan</td></tr>
|
||||
<tr><td>CD</td><td>The Time They Are A-Changin'</td></tr>
|
||||
<tr><td>Copyright Date</td><td>1964</td></tr>
|
||||
<tr><td>Label</td><td>Columbia</td></tr>
|
||||
<tr><td>ID</td><td>CK-8905</td></tr>
|
||||
<tr><td>Total Time</td><td>45:36</td></tr>
|
||||
<tr><td><a href="http://www.allmusic.com/cg/amg.dll?p=amg&sql=10:gifqxqt5ld0e">AMG Rating</a></td><td>4.5 stars</td></tr>
|
||||
<tr><td>ADO Rating</td><td>1.5 stars</td></tr>
|
||||
<tr><td>Notes<td>The title song is also available on "Bob Dylan's Greatest Hits" and "The Essential Bob Dylan."</td></tr>
|
||||
<tr><td> </td></tr>
|
||||
|
||||
<tr><td>Artist</td><td>Luciana Souza</td></tr>
|
||||
<tr><td>CD</td><td>Tide</td></tr>
|
||||
<tr><td>Copyright Date</td><td>2009</td></tr>
|
||||
<tr><td>Label</td><td>Universal Jazz France</td></tr>
|
||||
<tr><td>ID</td><td>B0012688-02</td></tr>
|
||||
<tr><td>Total Time</td><td>42:31</td></tr>
|
||||
<tr><td><a href="http://www.allmusic.com/cg/amg.dll?p=amg&sql=10:3bftxzw0ldhe"</a>AMG Rating</a></td><td>3.5 stars</td></tr>
|
||||
<tr><td>ADO Rating</td><td>2.5 stars</td></tr>
|
||||
<tr><td>Notes<td>Includes the song "Fire and Wood" with the lyric
|
||||
"The clocks were turned back you remeber/Think it's still November."
|
||||
</td></tr>
|
||||
<tr><td> </td></tr>
|
||||
|
||||
<tr><td>TV episode title</td><td>The Lost Hour</td>
|
||||
<tr><td>TV series</td><td><em>Eerie, Indiana</em></td>
|
||||
<tr><td>TV episode number</td><td>10</td>
|
||||
<tr><td>Network</td><td>NBC</td>
|
||||
<tr><td>Air date</td><td>1991-12-01</td>
|
||||
<tr><td>Notes</td><td>Despite Indiana's then-lack of DST, Marshall changes his clock with unusual consequences.</td></tr>
|
||||
<tr><td> </td></tr>
|
||||
|
||||
<tr><td>TV episode title</td><td>Time Tunnel</td>
|
||||
<tr><td>TV series</td><td><em>The Adventures of Pete & Pete</em></td>
|
||||
<tr><td>TV episode number</td><td>5, season 2</td>
|
||||
<tr><td>Network</td><td>Nickelodeon</td>
|
||||
<tr><td>Air date</td><td>1994-10-23</td>
|
||||
<tr><td>Notes</td><td>The two Petes travel back in time an hour on the day that DST ends.</td></tr>
|
||||
<tr><td> </td></tr>
|
||||
|
||||
<tr><td>TV episode title</td><td>King-Size Homer</td>
|
||||
<tr><td>TV series</td><td><em>The Simpsons</em></td>
|
||||
<tr><td>TV episode number</td><td>135</td>
|
||||
<tr><td>Network</td><td>Fox</td>
|
||||
<tr><td>Air date</td><td>1995-11-05</td>
|
||||
<tr><td>Notes</td><td>Homer, working from home, remarks "8:58, first
|
||||
time I've ever been early for work. Except for all those daylight
|
||||
savings days. Lousy farmers."</td></tr>
|
||||
<tr><td> </td></tr>
|
||||
|
||||
<tr><td>Artist</td><td>Jules Verne</td></tr>
|
||||
<tr><td>Book</td><td>Le Tour du Monde en Quatre-Vingts Jours
|
||||
(Around the World in Eighty Days)</td></tr>
|
||||
<tr><td>Notes</td><td>Wall-clock time plays a central role in the plot.
|
||||
European readers of the 1870s clearly held the U.S. press in
|
||||
deep contempt; the protagonists cross the U.S. without once
|
||||
reading a paper.
|
||||
An on-line French-language version of the book
|
||||
"with illustrations from the original 1873 French-language edition"
|
||||
is available at
|
||||
<a href="http://fourmilab.ch/etexts/www/tdm80j">http://fourmilab.ch/etexts/www/tdm80j</a>
|
||||
An on-line English-language translation of the book is available at
|
||||
<a href="http://www.literature.org/Works/Jules-Verne/eighty">http://www.literature.org/Works/Jules-Verne/eighty</a></td></tr>
|
||||
|
||||
<tr><td> </td></tr>
|
||||
<tr><td>Artist</td><td>Umberto Eco</td></tr>
|
||||
<tr><td>Book</td><td>The Island of the Day Before
|
||||
(L'isola del giorno prima)</td></tr>
|
||||
<tr><td>Copyright Date</td><td>1994</td></tr>
|
||||
<tr><td>Notes</td><td>
|
||||
"...the story of a 17th century Italian nobleman trapped near an island
|
||||
on the International Date Line. Time and time zones play an integral
|
||||
part in the novel." (Paul Eggert, 2006-04-22)
|
||||
</td></tr>
|
||||
<tr><td> </td></tr>
|
||||
<tr><td>Artist</td><td>David Jebb</td></tr>
|
||||
<tr><td>Book</td><td><a href="http://www.thethirteenthtimezone.com">
|
||||
The Thirteenth Time Zone</a></td></tr>
|
||||
<tr><td>Notes</td><td>
|
||||
"It's fiction, but it's based on his experiences and travels." (Paul Eggert, 2006-04-22)
|
||||
</td></tr>
|
||||
<tr><td> </td></tr>
|
||||
<tr><td>Artist</td><td>John Dunning</td></tr>
|
||||
<tr><td>Book</td><td><a
|
||||
href="http://www.simonsays.com/content/book.cfm?sid=33&pid=479719">Two
|
||||
O'Clock, Eastern Wartime</a></td></tr>
|
||||
<tr><td>Copyright Date</td><td>2001</td></tr>
|
||||
<tr><td>Notes</td><td>
|
||||
Mystery, history, daylight saving time, and old-time radio.
|
||||
</td></tr>
|
||||
<tr><td> </td></tr>
|
||||
<tr><td>Film</td><td>Bell Science - About Time</td></tr>
|
||||
<tr><td>Notes</td><td>The Frank Baxter/Richard Deacon extravaganza.
|
||||
Information is available at
|
||||
<a href="http://www.videoflicks.com/titles/1035/1035893.htm">http://www.videoflicks.com/titles/1035/1035893.htm</a></td></tr>
|
||||
</table>
|
||||
<hr>
|
||||
<ul>
|
||||
<li>
|
||||
An episode of "The Adventures of Superman" entitled "The Mysterious
|
||||
Cube," first aired 1958-02-24, had Superman convincing the controllers
|
||||
of WWV to broadcast time signals five minutes ahead of actual time;
|
||||
doing so got a crook trying to beat the statute of limitations to
|
||||
emerge a bit too early from the titular enclosure.
|
||||
</li>
|
||||
<li>
|
||||
The 1960s ITC television series "The Prisoner" included an episode
|
||||
entitled "The Chimes of Big Ben" in which our protagonist tumbled to
|
||||
the fraudulent nature of a Poland-to-England escape upon hearing "Big
|
||||
Ben" chiming on Polish local time.
|
||||
</li>
|
||||
<li>
|
||||
The series "Seinfeld" included an episode entitled "The Susie," first
|
||||
broadcast 1997-02-13, in which Kramer decides that daylight saving time
|
||||
isn't coming fast enough, so he sets his watch ahead an hour.
|
||||
</li>
|
||||
<li>
|
||||
The syndicated comic strip "Dilbert" featured an all-too-rare example of
|
||||
time zone humor on 1998-03-14.
|
||||
</li>
|
||||
<li>
|
||||
Surrealist artist Guy Billout's work "Date Line" appeared on page 103
|
||||
of the 1999-11 Atlantic Monthly.
|
||||
</li>
|
||||
<li>
|
||||
"Gloom, Gloom, Go Away" by Walter Kirn appeared on page 106 of Time
|
||||
Magazine's 2002-11-11 issue; among other things, it proposed
|
||||
year-round DST as a way of lessening wintertime despair.
|
||||
</li>
|
||||
<li>
|
||||
The "20 Hours in America" episode of "The West Wing," first aired 2002-09-25,
|
||||
saw White House staffers stranded in Indiana; they thought they had time to
|
||||
catch Air Force One but were done in by intra-Indiana local time changes.
|
||||
</li>
|
||||
<li>
|
||||
"In what time zone would you find New York City?" was a $200 question on
|
||||
the 1999-11-13 United States airing of "Who Wants to Be a Millionaire?"
|
||||
"In 1883, what industry led the movement to divide the U.S. into four time
|
||||
zones?" was a $32,000 question on the 2001-05-23 United States airing of
|
||||
"Who Wants to Be a Millionaire?" At this rate, the million-dollar time-zone
|
||||
question should have been asked 2002-06-04.
|
||||
</li>
|
||||
<li>
|
||||
A private jet's mid-flight change of time zones distorts Alison Dubois'
|
||||
premonition in the "We Had a Dream" episode of "Medium"
|
||||
(originally aired 2007-02-28).
|
||||
</li>
|
||||
<li>
|
||||
In the "30 Rock" episode "Anna Howard Shaw Day" (first broadcast 2010-02-11),
|
||||
Jack Donaghy's date realizes that a Geneva-to-New-York business phone call
|
||||
received in the evening must be fake given the difference in local times.
|
||||
</li>
|
||||
<li>
|
||||
In the 1946 movie "A Matter of Life and Death"
|
||||
(U.S. title "Stairway to Heaven")
|
||||
there is a reference to British Double Summer Time.
|
||||
The time does not play a large part in the plot;
|
||||
it's just a passing reference to the time when one of the
|
||||
characters was supposed to have died (but didn't).
|
||||
The IMDb page is at
|
||||
<a href="http://us.imdb.com/title/tt0038733/">
|
||||
http://us.imdb.com/title/tt0038733/
|
||||
</a>. (Dave Cantor)
|
||||
<li>
|
||||
The 1953 railway comedy movie "The Titfield Thunderbolt" includes a
|
||||
play on words on British Double Summer Time. Valentine's wife wants
|
||||
him to leave the pub and asks him, "Do you know what time it is?"
|
||||
And he, happy where he is, replies: "Yes, my love. Summer double time."
|
||||
IMDB page:
|
||||
<a href="http://us.imdb.com/title/tt0046436/">
|
||||
http://us.imdb.com/title/tt0046436/
|
||||
</a>. (Mark Brader, 2009-10-02)
|
||||
</li>
|
||||
<li>
|
||||
The premise of the 1999 caper movie "Entrapment" involves computers
|
||||
in an international banking network being shut down briefly at
|
||||
midnight in each time zone to avoid any problems at the transition
|
||||
from the year 1999 to 2000 in that zone. (Hmmmm.) If this shutdown
|
||||
is extended by 10 seconds, it will create a one-time opportunity for
|
||||
a gigantic computerized theft. To achieve this, at one location the
|
||||
crooks interfere with the microwave system supplying time signals to
|
||||
the computer, advancing the time by 0.1 second each minute over the
|
||||
last hour of 1999. (So this movie teaches us that 0.1 x 60 = 10.)
|
||||
IMDB page:
|
||||
<a href="http://us.imdb.com/title/tt0137494/">
|
||||
http://us.imdb.com/title/tt0137494/
|
||||
</a>. (Mark Brader, 2009-10-02)
|
||||
</li>
|
||||
</li>
|
||||
</ul>
|
||||
<hr>
|
||||
<ul>
|
||||
<li>
|
||||
"We're been using the five-cent nickle in this country since 1492.
|
||||
Now that's pretty near 100 years, daylight savings [sic]."
|
||||
(Groucho Marx as Captain Spaulding in "Animal Crackers", 1930,
|
||||
as noted by Will Fitzerald)
|
||||
</li>
|
||||
<li>
|
||||
Brady: "...[Bishop Usher] determined that the Lord began the Creation
|
||||
on the 23rd of October in the Year 4004 B.C. at -- uh, at 9 A.M.!"
|
||||
<br>
|
||||
Drummond: "That Eastern Standard Time? (Laughter) Or Rocky Mountain
|
||||
Time? (More laughter) It wasn't daylight-saving time, was it? Because
|
||||
the Lord didn't make the sun until the fourth day!"
|
||||
<br>
|
||||
(From the play "Inherit the Wind" by Jerome Lawrence and Robert E. Lee,
|
||||
filmed in 1960 with Spencer Tracy as Drummond and Fredric March as
|
||||
Brady, and several other times. Thanks to Mark Brader.)
|
||||
</li>
|
||||
<li>
|
||||
"Good news."
|
||||
"What did they do? Extend Daylight Saving Time year round?"
|
||||
(Professional tanner George Hamilton, in dialog from a
|
||||
May, 1999 episode of the syndicated television series "Baywatch")
|
||||
</li>
|
||||
<li>
|
||||
"A fundamental belief held by Americans is that if you are on land, you
|
||||
cannot be killed by a fish...So most Americans remain on land, believing
|
||||
they're safe. Unfortunately, this belief—like so many myths, such as that
|
||||
there's a reason for 'Daylight Saving Time'—is false."
|
||||
(Dave Barry column, 2000-07-02)
|
||||
</li>
|
||||
<li>
|
||||
"I once had sex for an hour and five minutes, but that was on the day
|
||||
when you turn the clocks ahead."
|
||||
(Garry Shandling, 52nd Annual Emmys, 2000-09-10)
|
||||
</li>
|
||||
<li>
|
||||
"Would it impress you if I told you I invented Daylight Savings Time?"
|
||||
("Sahjhan" to "Lilah" in dialog from the "Loyalty" episode of "Angel,"
|
||||
originally aired 2002-02-25)
|
||||
</li>
|
||||
<li>
|
||||
"I thought you said Tulsa was a three hour flight."
|
||||
"Well, you're forgetting about the time difference."
|
||||
("Chandler" and "Joey" in dialog from the episode of "Friends" first
|
||||
aired 2002-12-05)
|
||||
</li>
|
||||
<li>
|
||||
"Is that a pertinent fact,
|
||||
or are you trying to dazzle me with your command of time zones?"
|
||||
(Kelsey Grammer as "Frasier Crane")
|
||||
</li>
|
||||
<li>
|
||||
"Don't worry about the world coming to an end today.
|
||||
It is already tomorrow in Australia."
|
||||
(Charles M. Schulz, provided by Steve Summit)
|
||||
</li>
|
||||
</ul>
|
||||
</body>
|
||||
</html>
|
636
tz-art.html
Normal file
636
tz-art.html
Normal file
@ -0,0 +1,636 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Time and the Arts</title>
|
||||
</head>
|
||||
<body>
|
||||
<h1>Time and the Arts</h1>
|
||||
<h2>Documentaries</h2>
|
||||
<ul>
|
||||
<li>
|
||||
"<a href="https://www.youtube.com/watch?v=84aWtseb2-4">Daylight
|
||||
Saving Time Explained</a>" (2011; 6:39) lightly covers daylight saving
|
||||
time's theory, history, pros and cons. Among other things, it explains
|
||||
Arizona's daylight-saving enclaves quite well.</li>
|
||||
<li>
|
||||
"<a href="https://www.youtube.com/watch?v=-5wpm-gesOY">The Problem
|
||||
with Time & Timezones – Computerphile</a>" (2013; 10:12) delves
|
||||
into problems that programmers have with timekeeping.</li>
|
||||
<li>
|
||||
"<a href="https://www.rferl.org/a/28375932.html">All The Time In The World:
|
||||
Explaining The Mysteries Of Time Zones</a>" (2017; 2:15)
|
||||
briefly says why France has more time zones than Russia.
|
||||
<li>
|
||||
"<a href="https://www.youtube.com/watch?v=yRz-Dl60Lfc">Why Denmark is
|
||||
.17 Seconds Behind The World</a>" (2019; 6:29) explains why Denmark and
|
||||
the United Kingdom don't exactly follow their own law about civil time.
|
||||
<li>
|
||||
"About Time" (1962; 59 minutes) is part of the
|
||||
Bell Science extravaganza, with Frank Baxter, Richard Deacon, and Les Tremayne.
|
||||
Its advisor was Richard Feynman, and it was voiced by Mel Blanc.
|
||||
(<a href="https://www.imdb.com/title/tt0154110/">IMDb entry</a>.)</li>
|
||||
</ul>
|
||||
<h2>Movies</h2>
|
||||
<ul>
|
||||
<li>
|
||||
In the 1946 movie <em>A Matter of Life and Death</em>
|
||||
(U.S. title <em>Stairway to Heaven</em>)
|
||||
there is a reference to British Double Summer Time.
|
||||
The time does not play a large part in the plot;
|
||||
it's just a passing reference to the time when one of the
|
||||
characters was supposed to have died (but didn't).
|
||||
(<a href="https://www.imdb.com/title/tt0038733/">IMDb entry.</a>)
|
||||
(Dave Cantor)
|
||||
<li>
|
||||
The 1953 railway comedy movie <em>The Titfield Thunderbolt</em> includes a
|
||||
play on words on British Double Summer Time. Valentine's wife wants
|
||||
him to leave the pub and asks him, "Do you know what time it is?"
|
||||
And he, happy where he is, replies: "Yes, my love. Summer double time."
|
||||
(<a href="https://www.imdb.com/title/tt0046436/">IMDb entry.</a>)
|
||||
(Mark Brader, 2009-10-02)
|
||||
</li>
|
||||
<li>
|
||||
The premise of the 1999 caper movie <em>Entrapment</em> involves computers
|
||||
in an international banking network being shut down briefly at
|
||||
midnight in each time zone to avoid any problems at the transition
|
||||
from the year 1999 to 2000 in that zone. (Hmmmm.) If this shutdown
|
||||
is extended by 10 seconds, it will create a one-time opportunity for
|
||||
a gigantic computerized theft. To achieve this, at one location the
|
||||
crooks interfere with the microwave system supplying time signals to
|
||||
the computer, advancing the time by 0.1 second each minute over the
|
||||
last hour of 1999. (So this movie teaches us that 0.1 × 60 = 10.)
|
||||
(<a href="https://www.imdb.com/title/tt0137494/">IMDb entry.</a>)
|
||||
(Mark Brader, 2009-10-02)
|
||||
</li>
|
||||
<li>
|
||||
One mustn't forget the
|
||||
<a href="https://www.youtube.com/watch?v=k4EUTMPuvHo">trailer</a>
|
||||
(2014; 2:23) for the movie <em>Daylight Saving</em>.
|
||||
</li>
|
||||
</ul>
|
||||
<h2>TV episodes</h2>
|
||||
<ul>
|
||||
<li>
|
||||
An episode of <em>The Adventures of Superman</em> entitled "The Mysterious
|
||||
Cube," first aired 1958-02-24, had Superman convincing the controllers
|
||||
of the Arlington Time Signal to broadcast ahead of actual time;
|
||||
doing so got a crook trying to be declared dead to
|
||||
emerge a bit too early from the titular enclosure.
|
||||
(<a href="https://www.imdb.com/title/tt0506628/">IMDb entry</a>.)
|
||||
</li>
|
||||
<li>
|
||||
"<a href="https://en.wikipedia.org/wiki/The_Chimes_of_Big_Ben">The Chimes
|
||||
of Big Ben</a>", <em>The Prisoner</em>, episode 2, ITC, 1967-10-06.
|
||||
Our protagonist tumbles to
|
||||
the fraudulent nature of a Poland-to-England escape upon hearing "Big
|
||||
Ben" chiming on Polish local time.
|
||||
(<a href="https://www.imdb.com/title/tt0679185/">IMDb entry.</a>)
|
||||
</li>
|
||||
<li>
|
||||
"The Susie", <em>Seinfeld</em>, season 8, episode 15, NBC, 1997-02-13.
|
||||
Kramer decides that daylight saving time
|
||||
isn't coming fast enough, so he sets his watch ahead an hour.
|
||||
</li>
|
||||
<li>
|
||||
"20 Hours in America", <em>The West Wing</em>, season 4, episodes 1–2,
|
||||
2002-09-25, contained a <a
|
||||
href="https://www.youtube.com/watch?v=-J1NHzQ1sgc">scene</a> that
|
||||
saw White House staffers stranded in Indiana; they thought they had time to
|
||||
catch Air Force One but were done in by intra-Indiana local time changes.
|
||||
</li>
|
||||
<li>
|
||||
"In what time zone would you find New York City?" was a $200 question on
|
||||
the 1999-11-13 United States airing of <em>Who Wants to Be a Millionaire?</em>,
|
||||
and "In 1883, what industry led the movement to divide the U.S. into four time
|
||||
zones?" was a $32,000 question on the 2001-05-23 United States airing of
|
||||
the same show. At this rate, the million-dollar time-zone
|
||||
question should have been asked 2002-06-04.
|
||||
</li>
|
||||
<li>
|
||||
A private jet's mid-flight change of time zones distorts Alison Dubois'
|
||||
premonition in the "We Had a Dream" episode of <em>Medium</em>
|
||||
(originally aired 2007-02-28).
|
||||
</li>
|
||||
<li>
|
||||
A criminal's failure to account for the start of daylight saving is pivotal
|
||||
in "<a href="https://monk.fandom.com/wiki/Mr._Monk_and_the_Rapper">Mr. Monk
|
||||
and the Rapper</a>" (first aired 2007-07-20).
|
||||
</li>
|
||||
<li>
|
||||
In the <em>30 Rock</em> episode "Anna Howard Shaw Day"
|
||||
(first broadcast 2010-02-11),
|
||||
Jack Donaghy's date realizes that a Geneva-to-New-York business phone call
|
||||
received in the evening must be fake given the difference in local times.
|
||||
</li>
|
||||
<li>
|
||||
In the "Run by the Monkeys" episode of <em>Da Vinci's Inquest</em>
|
||||
(first broadcast 2002-11-17),
|
||||
a witness in a five-year-old fire case realizes they may not have set
|
||||
their clock back when daylight saving ended on the day of the fire,
|
||||
introducing the possibility of an hour when arson might have occurred.
|
||||
</li>
|
||||
<li>
|
||||
In "The Todd Couple" episode of <em>Outsourced</em> (first aired 2011-02-10),
|
||||
Manmeet sets up Valentine's Day teledates for 6:00 and 9:00pm;
|
||||
since one is with a New Yorker and the other with a San Franciscan,
|
||||
hilarity ensues.
|
||||
(Never mind that this should be 7:30am in Mumbai, yet for some reason the show
|
||||
proceeds as though it's also mid-evening there.)
|
||||
</li>
|
||||
<li>
|
||||
In the "14 Days to Go"/"T Minus..." episode of
|
||||
<em>You, Me and the Apocalypse</em>
|
||||
(first aired 2015-11-11 in the UK, 2016-03-10 in the US),
|
||||
the success of a mission to deal with a comet
|
||||
hinges on whether or not Russia observes daylight saving time.
|
||||
(In the US,
|
||||
the episode first aired in the week before the switch to <abbr>DST</abbr>.)
|
||||
</li>
|
||||
<li>
|
||||
"The Lost Hour", <em>Eerie, Indiana</em>, episode 10, NBC, 1991-12-01.
|
||||
Despite Indiana's then-lack of <abbr>DST</abbr>,
|
||||
Marshall changes his clock with unusual consequences.
|
||||
See "<a
|
||||
href="https://www.avclub.com/eerie-indiana-was-a-few-dimensions-ahead-of-its-time-1819833380"><em>Eerie,
|
||||
Indiana</em> was a few dimensions ahead of its time</a>".
|
||||
</li>
|
||||
<li>
|
||||
"Time Tunnel", <em>The Adventures of Pete & Pete</em>, season 2, episode 5,
|
||||
Nickelodeon, 1994-10-23.
|
||||
The two Petes travel back in time an hour
|
||||
on the day that <abbr>DST</abbr> ends.
|
||||
</li>
|
||||
<li>
|
||||
"King-Size Homer", <em>The Simpsons</em>, episode 135, Fox, 1995-11-05.
|
||||
Homer, working from home, remarks "8:58, first
|
||||
time I've ever been early for work. Except for all those daylight
|
||||
savings days. Lousy farmers."
|
||||
</li>
|
||||
<li>
|
||||
<em>Last Week Tonight with John Oliver</em>, season 2, episode 5, 2015-03-08,
|
||||
asked, "<a href="https://www.youtube.com/watch?v=br0NW9ufUUw">Daylight Saving
|
||||
Time – How Is This Still A Thing?</a>"
|
||||
</li>
|
||||
<li>
|
||||
"Tracks", <em>The Good Wife</em>, season 7, episode 12,
|
||||
CBS, 2016-01-17.
|
||||
The applicability of a contract hinges on the
|
||||
time zone associated with a video timestamp.
|
||||
</li>
|
||||
<li>
|
||||
"Justice", <em>Veep</em>, season 6, episode 4, HBO, 2017-05-07.
|
||||
Jonah's inability to understand <abbr>DST</abbr> ends up impressing a wealthy
|
||||
backer who sets him up for a 2020 presidential run.
|
||||
</li>
|
||||
</ul>
|
||||
<h2>Books, plays, and magazines</h2>
|
||||
<ul>
|
||||
<li>
|
||||
Jules Verne, <em>Around the World in Eighty Days</em>
|
||||
(<em>Le tour du monde en quatre-vingts jours</em>), 1873.
|
||||
Wall-clock time plays a central role in the plot.
|
||||
European readers of the 1870s clearly held the U.S. press in
|
||||
deep contempt; the protagonists cross the U.S. without once
|
||||
reading a paper.
|
||||
Available versions include
|
||||
<a href="https://www.gutenberg.org/ebooks/103">an English
|
||||
translation</a>, and
|
||||
<a href="https://fourmilab.ch/etexts/www/tdm80j">the original French</a>
|
||||
"with illustrations from the original 1873 French-language edition".
|
||||
</li>
|
||||
<li>
|
||||
Nick Enright, <em>Daylight Saving</em>, 1989.
|
||||
A fast-paced comedy about love and loneliness as the clocks turn back.
|
||||
</li>
|
||||
<li>
|
||||
Umberto Eco,
|
||||
<a href="https://en.wikipedia.org/wiki/The_Island_of_the_Day_Before"><em>The
|
||||
Island of the Day Before</em></a>
|
||||
(<em>L'isola del giorno prima</em>), 1994.
|
||||
"...the story of a 17th century Italian nobleman trapped near an island
|
||||
on the International Date Line. Time and time zones play an integral
|
||||
part in the novel." (Paul Eggert, 2006-04-22)
|
||||
</li>
|
||||
<li>
|
||||
John Dunning, <a
|
||||
href="https://www.simonandschuster.com/books/Two-OClock-Eastern-Wartime/John-Dunning/9781439171530"><em>Two
|
||||
O'Clock, Eastern Wartime</em></a>, 2001.
|
||||
Mystery, history, daylight saving time, and old-time radio.
|
||||
</li>
|
||||
<li>
|
||||
Surrealist artist Guy Billout's work "Date Line" appeared on page 103
|
||||
of the 1999-11 <em>Atlantic Monthly</em>.
|
||||
</li>
|
||||
<li>
|
||||
"Gloom, Gloom, Go Away" by Walter Kirn appeared on page 106 of <em>Time</em>
|
||||
magazine's 2002-11-11 issue; among other things, it proposed
|
||||
year-round <abbr>DST</abbr> as a way of lessening wintertime despair.
|
||||
</li>
|
||||
</ul>
|
||||
<h2>Music</h2>
|
||||
<p>
|
||||
Data on recordings of "Save That Time," Russ Long, Serrob Publishing, BMI:</p>
|
||||
<table>
|
||||
<tr><td>Artist</td><td>Karrin Allyson</td></tr>
|
||||
<tr><td>CD</td><td>I Didn't Know About You</td></tr>
|
||||
<tr><td>Copyright Date</td><td>1993</td></tr>
|
||||
<tr><td>Label</td><td>Concord Jazz, Inc.</td></tr>
|
||||
<tr><td>ID</td><td>CCD-4543</td></tr>
|
||||
<tr><td>Track Time</td><td>3:44</td></tr>
|
||||
<tr><td>Personnel</td><td>Karrin Allyson, vocal;
|
||||
Russ Long, piano;
|
||||
Gerald Spaits, bass;
|
||||
Todd Strait, drums</td></tr>
|
||||
<tr><td>Notes</td><td>CD notes "additional lyric by Karrin Allyson;
|
||||
arranged by Russ Long and Karrin Allyson"</td></tr>
|
||||
<tr><td>ADO Rating</td><td>1 star</td></tr>
|
||||
<tr><td><a href="https://www.allmusic.com/album/i-didnt-know-about-you-mw0000618657">AMG Rating</a></td><td>4 stars</td></tr>
|
||||
<tr><td>Penguin Rating</td><td>3.5 stars</td></tr>
|
||||
<tr><td> </td><td></td></tr>
|
||||
<tr><td>Artist</td><td>Kevin Mahogany</td></tr>
|
||||
<tr><td>CD</td><td>Double Rainbow</td></tr>
|
||||
<tr><td>Copyright Date</td><td>1993</td></tr>
|
||||
<tr><td>Label</td><td>Enja Records</td></tr>
|
||||
<tr><td>ID</td><td>ENJ-7097 2</td></tr>
|
||||
<tr><td>Track Time</td><td>6:27</td></tr>
|
||||
<tr><td>Personnel</td><td>Kevin Mahogany, vocal;
|
||||
Kenny Barron, piano;
|
||||
Ray Drummond, bass;
|
||||
Ralph Moore, tenor saxophone;
|
||||
Lewis Nash, drums</td></tr>
|
||||
<tr><td>ADO Rating</td><td>1.5 stars</td></tr>
|
||||
<tr><td><a href="https://www.allmusic.com/album/double-rainbow-mw0000620371">AMG Rating</a></td><td>3 stars</td></tr>
|
||||
<tr><td>Penguin Rating</td><td>3 stars</td></tr>
|
||||
<tr><td> </td><td></td></tr>
|
||||
<tr><td>Artist</td><td>Joe Williams</td></tr>
|
||||
<tr><td>CD</td><td>Here's to Life</td></tr>
|
||||
<tr><td>Copyright Date</td><td>1994</td></tr>
|
||||
<tr><td>Label</td><td>Telarc International Corporation</td></tr>
|
||||
<tr><td>ID</td><td>CD-83357</td></tr>
|
||||
<tr><td>Track Time</td><td>3:58</td></tr>
|
||||
<tr><td>Personnel</td><td>Joe Williams, vocal
|
||||
The Robert Farnon [39 piece] Orchestra</td></tr>
|
||||
<tr><td>Notes</td><td>This CD is also available as part of a 3-CD package from
|
||||
Telarc, "Triple Play" (CD-83461)</td></tr>
|
||||
<tr><td>ADO Rating</td><td>black dot</td></tr>
|
||||
<tr><td><a href="https://www.allmusic.com/album/heres-to-life-mw0000623648">AMG Rating</a></td><td>2 stars</td></tr>
|
||||
<tr><td>Penguin Rating</td><td>3 stars</td></tr>
|
||||
<tr><td> </td><td></td></tr>
|
||||
<tr><td>Artist</td><td>Charles Fambrough</td></tr>
|
||||
<tr><td>CD</td><td>Keeper of the Spirit</td></tr>
|
||||
<tr><td>Copyright Date</td><td>1995</td></tr>
|
||||
<tr><td>Label</td><td>AudioQuest Music</td></tr>
|
||||
<tr><td>ID</td><td>AQ-CD1033</td></tr>
|
||||
<tr><td>Track Time</td><td>7:07</td></tr>
|
||||
<tr><td>Personnel</td><td>Charles Fambrough, bass;
|
||||
Joel Levine, tenor recorder;
|
||||
Edward Simon, piano;
|
||||
Lenny White, drums;
|
||||
Marion Simon, percussion</td></tr>
|
||||
<tr><td>ADO Rating</td><td>2 stars</td></tr>
|
||||
<tr><td><a href="https://www.allmusic.com/album/keeper-of-the-spirit-mw0000176559">AMG Rating</a></td><td>unrated</td></tr>
|
||||
<tr><td>Penguin Rating</td><td>3 stars</td></tr>
|
||||
</table>
|
||||
<hr>
|
||||
<p>Also of note:</p>
|
||||
<table>
|
||||
<tr><td>Artist</td><td>Holly Cole Trio</td></tr>
|
||||
<tr><td>CD</td><td>Blame It On My Youth</td></tr>
|
||||
<tr><td>Copyright Date</td><td>1992</td></tr>
|
||||
<tr><td>Label</td><td>Manhattan</td></tr>
|
||||
<tr><td>ID</td><td>CDP 7 97349 2</td></tr>
|
||||
<tr><td>Total Time</td><td>37:45</td></tr>
|
||||
<tr><td>Personnel</td><td>Holly Cole, voice;
|
||||
Aaron Davis, piano;
|
||||
David Piltch, string bass</td></tr>
|
||||
<tr><td>Notes</td><td>Lyrical reference to "Eastern Standard Time" in
|
||||
Tom Waits' "Purple Avenue"</td></tr>
|
||||
<tr><td>ADO Rating</td><td>2.5 stars</td></tr>
|
||||
<tr><td><a href="https://www.allmusic.com/album/blame-it-on-my-youth-mw0000274303">AMG Rating</a></td><td>3 stars</td></tr>
|
||||
<tr><td>Penguin Rating</td><td>unrated</td></tr>
|
||||
<tr><td> </td><td></td></tr>
|
||||
<tr><td>Artist</td><td>Milt Hinton</td></tr>
|
||||
<tr><td>CD</td><td>Old Man Time</td></tr>
|
||||
<tr><td>Copyright Date</td><td>1990</td></tr>
|
||||
<tr><td>Label</td><td>Chiaroscuro</td></tr>
|
||||
<tr><td>ID</td><td>CR(D) 310</td></tr>
|
||||
<tr><td>Total Time</td><td>149:38 (two CDs)</td></tr>
|
||||
<tr><td>Personnel</td><td>Milt Hinton, bass;
|
||||
Doc Cheatham, Dizzy Gillespie, Clark Terry, trumpet;
|
||||
Al Grey, trombone;
|
||||
Eddie Barefield, Joe Camel (Flip Phillips), Buddy Tate,
|
||||
clarinet and saxophone;
|
||||
John Bunch, Red Richards, Norman Simmons, Derek Smith,
|
||||
Ralph Sutton, piano;
|
||||
Danny Barker, Al Casey, guitar;
|
||||
Gus Johnson, Gerryck King, Bob Rosengarden, Jackie Williams,
|
||||
drums;
|
||||
Lionel Hampton, vibraphone;
|
||||
Cab Calloway, Joe Williams, vocal;
|
||||
Buck Clayton, arrangements</td></tr>
|
||||
<tr><td>Notes</td><td>tunes include Old Man Time, Time After Time,
|
||||
Sometimes I'm Happy,
|
||||
A Hot Time in the Old Town Tonight,
|
||||
Four or Five Times, Now's the Time,
|
||||
Time on My Hands, This Time It's Us,
|
||||
and Good Time Charlie.
|
||||
<a href="http://www.chiaroscurojazz.com/album.php?C=310">Album info</a>
|
||||
is available.</td></tr>
|
||||
<tr><td>ADO Rating</td><td>3 stars</td></tr>
|
||||
<tr><td><a href="https://www.allmusic.com/album/old-man-time-mw0000269353">AMG Rating</a></td><td>4.5 stars</td></tr>
|
||||
<tr><td>Penguin Rating</td><td>3 stars</td></tr>
|
||||
<tr><td> </td><td></td></tr>
|
||||
<tr><td>Artist</td><td>Alan Broadbent</td></tr>
|
||||
<tr><td>CD</td><td>Pacific Standard Time</td></tr>
|
||||
<tr><td>Copyright Date</td><td>1995</td></tr>
|
||||
<tr><td>Label</td><td>Concord Jazz, Inc.</td></tr>
|
||||
<tr><td>ID</td><td>CCD-4664</td></tr>
|
||||
<tr><td>Total Time</td><td>62:42</td></tr>
|
||||
<tr><td>Personnel</td><td>Alan Broadbent, piano;
|
||||
Putter Smith, Bass;
|
||||
Frank Gibson, Jr., drums</td></tr>
|
||||
<tr><td>Notes</td><td>The CD cover features an analemma for equation-of-time fans</td></tr>
|
||||
<tr><td>ADO Rating</td><td>1 star</td></tr>
|
||||
<tr><td><a href="https://www.allmusic.com/album/pacific-standard-time-mw0000645433">AMG Rating</a></td><td>4 stars</td></tr>
|
||||
<tr><td>Penguin Rating</td><td>3.5 stars</td></tr>
|
||||
<tr><td> </td><td></td></tr>
|
||||
<tr><td>Artist</td><td>Anthony Braxton/Richard Teitelbaum</td></tr>
|
||||
<tr><td>CD</td><td>Silence/Time Zones</td></tr>
|
||||
<tr><td>Copyright Date</td><td>1996</td></tr>
|
||||
<tr><td>Label</td><td>Black Lion</td></tr>
|
||||
<tr><td>ID</td><td>BLCD 760221</td></tr>
|
||||
<tr><td>Total Time</td><td>72:58</td></tr>
|
||||
<tr><td>Personnel</td><td>Anthony Braxton, sopranino and alto saxophones,
|
||||
contrebasse clarinet, miscellaneous instruments;
|
||||
Leo Smith, trumpet and miscellaneous instruments;
|
||||
Leroy Jenkins, violin and miscellaneous instruments;
|
||||
Richard Teitelbaum, modular moog and micromoog synthesizer</td></tr>
|
||||
<tr><td>ADO Rating</td><td>black dot</td></tr>
|
||||
<tr><td><a href="https://www.allmusic.com/album/silence-time-zones-mw0000595735">AMG Rating</a></td><td>4 stars</td></tr>
|
||||
<tr><td> </td><td></td></tr>
|
||||
<tr><td>Artist</td><td>Charles Gayle</td></tr>
|
||||
<tr><td>CD</td><td>Time Zones</td></tr>
|
||||
<tr><td>Copyright Date</td><td>2006</td></tr>
|
||||
<tr><td>Label</td><td>Tompkins Square</td></tr>
|
||||
<tr><td>ID</td><td>TSQ2839</td></tr>
|
||||
<tr><td>Total Time</td><td>49:06</td></tr>
|
||||
<tr><td>Personnel</td><td>Charles Gayle, piano</td></tr>
|
||||
<tr><td>ADO Rating</td><td>1 star</td></tr>
|
||||
<tr><td><a href="https://www.allmusic.com/album/time-zones-mw0000349642">AMG Rating</a></td><td>4.5 stars</td></tr>
|
||||
<tr><td> </td><td></td></tr>
|
||||
<tr><td>Artist</td><td>The Get Up Kids</td></tr>
|
||||
<tr><td>CD</td><td>Eudora</td></tr>
|
||||
<tr><td>Copyright Date</td><td>2001</td></tr>
|
||||
<tr><td>Label</td><td>Vagrant</td></tr>
|
||||
<tr><td>ID</td><td>357</td></tr>
|
||||
<tr><td>Total Time</td><td>65:12</td></tr>
|
||||
<tr><td>Notes</td><td>Includes the song "Central Standard Time." Thanks to Colin Bowern for this information.</td></tr>
|
||||
<tr><td><a href="https://www.allmusic.com/album/eudora-mw0000592063">AMG Rating</a></td><td>2.5 stars</td></tr>
|
||||
<tr><td> </td><td></td></tr>
|
||||
|
||||
<tr><td>Artist</td><td>Coldplay</td></tr>
|
||||
<tr><td>Song</td><td>Clocks</td></tr>
|
||||
<tr><td>Copyright Date</td><td>2003</td></tr>
|
||||
<tr><td>Label</td><td>Capitol Records</td></tr>
|
||||
<tr><td>ID</td><td>52608</td></tr>
|
||||
<tr><td>Total Time</td><td>4:13</td></tr>
|
||||
<tr><td>Notes</td><td>Won the 2004 Record of the Year honor at the
|
||||
Grammy Awards. Co-written and performed by Chris Martin,
|
||||
great-great-grandson of <abbr>DST</abbr> inventor William Willett.
|
||||
The song's first line is "Lights go out and I can't be saved".</td></tr>
|
||||
<tr><td> </td><td></td></tr>
|
||||
|
||||
<tr><td>Artist</td><td>Jaime Guevara</td></tr>
|
||||
<tr><td>Song</td><td><a
|
||||
href="https://www.youtube.com/watch?v=ZfN4Fe_A50U">Qué
|
||||
hora es</a></td></tr>
|
||||
<tr><td>Date</td><td>1993</td></tr>
|
||||
<tr><td>Total Time</td><td>3:04</td></tr>
|
||||
<tr><td>Notes</td><td>The song protested "Sixto Hour" in Ecuador
|
||||
(1992–3). Its lyrics include "Amanecía en mitad de la noche, los
|
||||
guaguas iban a clase sin sol" ("It was dawning in the middle of the
|
||||
night, the buses went to class without sun").
|
||||
<tr><td> </td><td></td></tr>
|
||||
|
||||
<tr><td>Artist</td><td>Irving Kahal and Harry Richman</td></tr>
|
||||
<tr><td>Song</td><td>There Ought to be a Moonlight Saving Time</td></tr>
|
||||
<tr><td>Copyright Date</td><td>1931</td>
|
||||
<tr><td>Notes</td><td>This musical standard was a No. 1 hit for Guy Lombardo
|
||||
in 1931, and was also performed by Maurice Chevalier, Blossom Dearie
|
||||
and many others. The phrase "Moonlight saving time" also appears in
|
||||
the 1995 country song "Not Enough Hours in the Night" written by Aaron
|
||||
Barker, Kim Williams and Rob Harbin and performed by Doug
|
||||
Supernaw.</td></tr>
|
||||
<tr><td> </td><td></td></tr>
|
||||
|
||||
<tr><td>Artist</td><td>The Microscopic Septet</td></tr>
|
||||
<tr><td>CD</td><td>Lobster Leaps In</td></tr>
|
||||
<tr><td>Copyright Date</td><td>2008</td></tr>
|
||||
<tr><td>Label</td><td>Cuneiform</td></tr>
|
||||
<tr><td>ID</td><td>272</td></tr>
|
||||
<tr><td>Total Time</td><td>73:05</td></tr>
|
||||
<tr><td>Notes</td><td>Includes the song "Twilight Time Zone."</td></tr>
|
||||
<tr><td><a href="https://www.allmusic.com/album/lobster-leaps-in-mw0000794929">AMG Rating</a></td><td>3.5 stars</td></tr>
|
||||
<tr><td>ADO Rating</td><td>2 stars</td></tr>
|
||||
|
||||
<tr><td> </td><td></td></tr>
|
||||
|
||||
<tr><td>Artist</td><td>Bob Dylan</td></tr>
|
||||
<tr><td>CD</td><td>The Times They Are a-Changin'</td></tr>
|
||||
<tr><td>Copyright Date</td><td>1964</td></tr>
|
||||
<tr><td>Label</td><td>Columbia</td></tr>
|
||||
<tr><td>ID</td><td>CK-8905</td></tr>
|
||||
<tr><td>Total Time</td><td>45:36</td></tr>
|
||||
<tr><td><a href="https://www.allmusic.com/album/the-times-they-a-changin-mw0000202344">AMG Rating</a></td><td>4.5 stars</td></tr>
|
||||
<tr><td>ADO Rating</td><td>1.5 stars</td></tr>
|
||||
<tr><td>Notes<td>The title song is also available on "Bob Dylan's Greatest Hits" and "The Essential Bob Dylan."</td></tr>
|
||||
<tr><td> </td><td></td></tr>
|
||||
|
||||
<tr><td>Artist</td><td>Luciana Souza</td></tr>
|
||||
<tr><td>CD</td><td>Tide</td></tr>
|
||||
<tr><td>Copyright Date</td><td>2009</td></tr>
|
||||
<tr><td>Label</td><td>Universal Jazz France</td></tr>
|
||||
<tr><td>ID</td><td>B0012688-02</td></tr>
|
||||
<tr><td>Total Time</td><td>42:31</td></tr>
|
||||
<tr><td><a href="https://www.allmusic.com/album/tide-mw0000815692">AMG Rating</a></td><td>3.5 stars</td></tr>
|
||||
<tr><td>ADO Rating</td><td>2.5 stars</td></tr>
|
||||
<tr><td>Notes<td>Includes the song "Fire and Wood" with the lyric
|
||||
"The clocks were turned back you remember/Think it's still November."
|
||||
</td></tr>
|
||||
<tr><td> </td><td></td></tr>
|
||||
<tr><td>Artist</td><td>Ken Nordine</td></tr>
|
||||
<tr><td>CD</td><td>You're Getting Better: The Word Jazz Dot Masters</td></tr>
|
||||
<tr><td>Copyright Date</td><td>2005</td></tr>
|
||||
<tr><td>Label</td><td>Geffen</td></tr>
|
||||
<tr><td>ID</td><td>B0005171-02</td></tr>
|
||||
<tr><td>Total Time</td><td>156:22</td></tr>
|
||||
<tr><td>ADO Rating</td><td>1 star</td></tr>
|
||||
<tr><td><a href="https://www.allmusic.com/album/youre-getting-better-the-word-jazz-dot-masters-mw0000736197">AMG Rating</a></td><td>4.5 stars</td></tr>
|
||||
<tr><td>Notes</td><td>Includes the piece "What Time Is It"
|
||||
("He knew what time it was everywhere...that counted").</td></tr>
|
||||
<tr><td> </td><td></td></tr>
|
||||
<tr><td>Artist</td><td>Chicago</td></tr>
|
||||
<tr><td>CD</td><td>Chicago Transit Authority</td></tr>
|
||||
<tr><td>Copyright Date</td><td>1969</td></tr>
|
||||
<tr><td>Label</td><td>Columbia</td></tr>
|
||||
<tr><td>ID</td><td>64409</td></tr>
|
||||
<tr><td>Total Time</td><td>1:16:20</td></tr>
|
||||
<tr><td><a href="https://www.allmusic.com/album/chicago-transit-authority-mw0000189364">AMG Rating</a></td><td>4 stars</td></tr>
|
||||
<tr><td>Notes</td><td>Includes the song "Does Anybody Really Know What Time It Is?"</td></tr>
|
||||
</table>
|
||||
<h2>Comics</h2>
|
||||
<ul>
|
||||
<li>
|
||||
The webcomic <em>xkcd</em> has the strip
|
||||
"<a href="https://xkcd.com/673/">The Sun</a>" (2009-12-09) and the panels
|
||||
"<a href="https://xkcd.com/1017/">Backward in Time</a>" (2012-02-14),
|
||||
"<a href="https://xkcd.com/1061/">EST</a>" (2012-05-28),
|
||||
"<a href="https://xkcd.com/1179/">ISO 8601</a>" (2013-02-27),
|
||||
"<a href="https://xkcd.com/1335/">Now</a>" (2014-02-26),
|
||||
"<a href="https://xkcd.com/1655/">Doomsday Clock</a>" (2016-03-14),
|
||||
"<a href="https://xkcd.com/1799/">Bad Map Projection: Time Zones</a>"
|
||||
(2017-02-15),
|
||||
"<a href="https://xkcd.com/1883/">Supervillain Plan</a>" (2017-08-30),
|
||||
"<a href="https://xkcd.com/2050/">6/6 Time</a>" (2018-09-24),
|
||||
and "<a href="https://xkcd.com/2266/">Leap Smearing</a>" (2020-02-10).
|
||||
The related book <em>What If?</em> has an entry
|
||||
"<a href="https://what-if.xkcd.com/26/">Leap Seconds</a>" (2012-12-31).
|
||||
</li>
|
||||
<li>
|
||||
Pig kills time in <a
|
||||
href="https://www.gocomics.com/pearlsbeforeswine/2016/11/06"><em>Pearls
|
||||
Before Swine</em> (2016-11-06)</a>.
|
||||
</li>
|
||||
<li>
|
||||
Stonehenge is abandoned in <a
|
||||
href="https://www.gocomics.com/nonsequitur/2017/03/12"><em>Non Sequitur</em>
|
||||
(2017-03-12)</a>.
|
||||
<li>
|
||||
The boss freaks out in <a
|
||||
href="https://dilbert.com/strip/1998-03-14"><em>Dilbert</em> (1998-03-14)</a>.
|
||||
</li>
|
||||
<li>
|
||||
Peppermint Patty: "What if the world comes to an end tonight, Marcie?"
|
||||
<br>
|
||||
Marcie: "I promise there'll be a tomorrow, sir ... in fact,
|
||||
it's already tomorrow in Australia!"
|
||||
<br>
|
||||
(Charles M. Schulz, <a href="https://www.gocomics.com/peanuts/1980/06/13"><em>Peanuts</em>, 1980-06-13</a>)
|
||||
</li>
|
||||
</ul>
|
||||
<h2>Jokes</h2>
|
||||
<ul>
|
||||
<li>
|
||||
The idea behind daylight saving time was first proposed as a joke by
|
||||
Benjamin Franklin. To enforce it, he suggested, "Every
|
||||
morning, as soon as the sun rises, let all the bells in every church
|
||||
be set ringing; and if that is not sufficient, let cannon be fired in
|
||||
every street, to wake the sluggards effectually, and make them open
|
||||
their eyes to see their true interest. All the difficulty will be in
|
||||
the first two or three days: after which the reformation will be as
|
||||
natural and easy as the present irregularity; for, <em>ce n'est que le
|
||||
premier pas qui coûte</em>."
|
||||
<a href="http://www.webexhibits.org/daylightsaving/franklin3.html">Franklin's
|
||||
joke</a> was first published on 1784-04-26 by the
|
||||
<em>Journal de Paris</em> as <a
|
||||
href="https://en.wikipedia.org/wiki/File:Franklin-Benjamin-Journal-de-Paris-1784.jpg">an
|
||||
anonymous letter translated into French</a>.
|
||||
</li>
|
||||
<li>
|
||||
"We've been using the five-cent nickel in this country since 1492.
|
||||
Now that's pretty near 100 years, daylight saving."
|
||||
(Groucho Marx as Captain Spaulding in <em>Animal Crackers</em>, 1930,
|
||||
as noted by Will Fitzgerald)
|
||||
</li>
|
||||
<li>
|
||||
BRADY. ...[Bishop Usher] determined that the Lord began the Creation
|
||||
on the 23rd of October in the Year 4,004 B.C. at – uh, 9 A.M.!
|
||||
<br>
|
||||
DRUMMOND. That Eastern Standard Time? (<em>Laughter.</em>) Or Rocky Mountain
|
||||
Time? (<em>More laughter.</em>) It wasn't daylight-saving time, was it? Because
|
||||
the Lord didn't make the sun until the fourth day!
|
||||
<br>
|
||||
(From the play <em>Inherit the Wind</em> by Jerome Lawrence and Robert E. Lee,
|
||||
filmed in 1960 with Spencer Tracy as Drummond and Fredric March as
|
||||
Brady, and several other times. Thanks to Mark Brader.)
|
||||
</li>
|
||||
<li>
|
||||
"Good news."
|
||||
"What did they do? Extend Daylight Saving Time year round?"
|
||||
(Professional tanner George Hamilton, in dialog from a
|
||||
May, 1999 episode of the syndicated television series <em>Baywatch</em>)
|
||||
</li>
|
||||
<li>
|
||||
"A fundamental belief held by Americans is that if you are on land, you
|
||||
cannot be killed by a fish...So most Americans remain on land, believing
|
||||
they're safe. Unfortunately, this belief – like so many myths, such as that
|
||||
there's a reason for 'Daylight Saving Time' – is false."
|
||||
(Dave Barry column, 2000-07-02)
|
||||
</li>
|
||||
<li>
|
||||
"I once had sex for an hour and five minutes, but that was on the day
|
||||
when you turn the clocks ahead."
|
||||
(Garry Shandling, 52nd Annual Emmys, 2000-09-10)
|
||||
</li>
|
||||
<li>
|
||||
"Would it impress you if I told you I invented Daylight Savings Time?"
|
||||
("Sahjhan" to "Lilah" in dialog from the "Loyalty" episode of <em>Angel</em>,
|
||||
originally aired 2002-02-25)
|
||||
</li>
|
||||
<li>
|
||||
"I thought you said Tulsa was a three-hour flight."
|
||||
"Well, you're forgetting about the time difference."
|
||||
("Joey" and "Chandler" in dialog from the episode of <em>Friends</em>
|
||||
entitled "The One With Rachel's Phone Number," originally aired 2002-12-05)
|
||||
</li>
|
||||
<li>
|
||||
"Is that a pertinent fact,
|
||||
or are you just trying to dazzle me with your command of time zones?"
|
||||
(Kelsey Grammer as "Frasier Crane" to "Roz" from the episode of <em>Frasier</em>
|
||||
entitled "The Kid," originally aired 1997-11-04)
|
||||
</li>
|
||||
<li>
|
||||
"I put myself and my staff through this crazy, huge ordeal, all because
|
||||
I refused to go on at midnight, okay? And so I work, you know, and
|
||||
then I get this job at eleven, supposed to be a big deal. Then
|
||||
yesterday daylight [saving] time ended. Right now it's basically
|
||||
midnight." (Conan O'Brien on the 2010-11-08 premiere of <em>Conan</em>.)
|
||||
</li>
|
||||
<li>
|
||||
"The best method, I told folks, was to hang a large clock high on a
|
||||
barn wall where all the cows could see it. If you have Holsteins, you
|
||||
will need to use an analog clock." (Jerry Nelson, <a
|
||||
href="http://www.agriculture.com/family/farm-humor/how-to-adjust-dairy-cows-to-daylight-savings-time">How
|
||||
to adjust dairy cows to daylight saving time</a>", <em>Successful Farming</em>,
|
||||
2017-10-09.)
|
||||
</li>
|
||||
<li>
|
||||
"And now, driving to California, I find that I must enter a password
|
||||
in order to change the time zone on my laptop clock. Evidently,
|
||||
someone is out to mess up my schedule and my clock must be secured."
|
||||
(Garrison Keillor,
|
||||
"<a href="http://www.garrisonkeillor.com/weve-never-been-here-before/">We've
|
||||
never been here before</a>", 2017-08-22)
|
||||
</li>
|
||||
<li>
|
||||
"Well, in my time zone that's all the time I have,
|
||||
but maybe in your time zone I haven't finished yet. So stay tuned!"
|
||||
(Goldie Hawn, <em>Rowan & Martin's Laugh-In</em> No. 65, 1970-03-09)
|
||||
</li>
|
||||
</ul>
|
||||
<h2>See also</h2>
|
||||
<ul>
|
||||
<li><a href="tz-link.html">Time Zone and Daylight Saving
|
||||
Time Data</a></li>
|
||||
</ul>
|
||||
<hr>
|
||||
<address>
|
||||
This web page is in the public domain, so clarified as of
|
||||
2009-05-17 by Arthur David Olson.
|
||||
<br>
|
||||
Please send corrections to this web page to the
|
||||
<a href="mailto:tz@iana.org">time zone mailing list</a>.
|
||||
</address>
|
||||
</body>
|
||||
</html>
|
719
tz-how-to.html
Normal file
719
tz-how-to.html
Normal file
@ -0,0 +1,719 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>How to Read the tz Database</title>
|
||||
<meta charset="UTF-8">
|
||||
<style>
|
||||
pre {margin-left: 2em; white-space: pre-wrap;}
|
||||
pre.td {margin-left: 0;}
|
||||
td {text-align: center;}
|
||||
table {border: 1px outset;}
|
||||
th, td {border: 1px inset;}
|
||||
table.rule {border: none; margin: auto;}
|
||||
td.footnote {text-align: left;}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<h2>How to Read the <a href="https://en.wikipedia.org/wiki/Tz_database">tz
|
||||
Database</a> Source Files</h2>
|
||||
<h3>by Bill Seymour</h3>
|
||||
<p>This guide uses the <code>America/Chicago</code> and
|
||||
<code>Pacific/Honolulu</code> zones as examples of how to infer
|
||||
times of day from the <a href="tz-link.html">tz database</a>
|
||||
source files. It might be helpful, but not absolutely necessary,
|
||||
for the reader to have already downloaded the
|
||||
latest release of the database and become familiar with the basic layout
|
||||
of the data files. The format is explained in the “man
|
||||
page” for the zic compiler, <code>zic.8.txt</code>, in
|
||||
the <code>code</code> subdirectory.
|
||||
Although this guide covers many of the common cases, it is not a
|
||||
complete summary of what zic accepts; the man page is the
|
||||
authoritative reference.</p>
|
||||
|
||||
<p>We’ll begin by talking about the rules for changing between standard
|
||||
and daylight saving time since we’ll need that information when we talk
|
||||
about the zones.</p>
|
||||
|
||||
<p>First, let’s consider the special daylight saving time rules
|
||||
for Chicago (from the <code>northamerica</code> file in
|
||||
the <code>data</code> subdirectory):</p>
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<th colspan="6">From the Source File</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="6">
|
||||
<table class="rule">
|
||||
<tr><td style="border:none;text-align:left">
|
||||
<pre class="td">
|
||||
#Rule NAME FROM TO - IN ON AT SAVE LETTER
|
||||
Rule Chicago 1920 only - Jun 13 2:00 1:00 D
|
||||
Rule Chicago 1920 1921 - Oct lastSun 2:00 0 S
|
||||
Rule Chicago 1921 only - Mar lastSun 2:00 1:00 D
|
||||
Rule Chicago 1922 1966 - Apr lastSun 2:00 1:00 D
|
||||
Rule Chicago 1922 1954 - Sep lastSun 2:00 0 S
|
||||
Rule Chicago 1955 1966 - Oct lastSun 2:00 0 S
|
||||
</pre>
|
||||
</td></tr></table></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th colspan="6">Reformatted a Bit</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>From</th>
|
||||
<th>To</th>
|
||||
<th colspan="2">On</th>
|
||||
<th>At</th>
|
||||
<th>Action</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2">1920 only</td>
|
||||
<td colspan="2">June 13<small><sup>th</sup></small></td>
|
||||
<td rowspan="6">02:00 local</td>
|
||||
<td>go to daylight saving time</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>1920</td>
|
||||
<td>1921</td>
|
||||
<td rowspan="5">last Sunday</td>
|
||||
<td>in October</td>
|
||||
<td>return to standard time</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2">1921 only</td>
|
||||
<td>in March</td>
|
||||
<td rowspan="2">go to daylight saving time</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td rowspan="2">1922</td>
|
||||
<td>1966</td>
|
||||
<td>in April</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>1954</td>
|
||||
<td>in September</td>
|
||||
<td rowspan="2">return to standard time</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>1955</td>
|
||||
<td>1966</td>
|
||||
<td>in October</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<p>The <code>FROM</code> and <code>TO</code> columns, respectively, specify the
|
||||
first and last calendar years defining a contiguous range over which a specific
|
||||
Rule line is to apply. The keyword <code>only</code> can be used in the
|
||||
<code>TO</code> field to repeat the value of the <code>FROM</code> field in the
|
||||
event that a rule should only apply to a single year. Often, the keyword
|
||||
<code>max</code> is used to extend a rule’s application into the
|
||||
indefinite future; it is a platform-agnostic stand-in for the largest
|
||||
representable year.
|
||||
|
||||
<p>The next column, <code>-</code>, is reserved; for compatibility with earlier
|
||||
releases, it always contains a hyphen, which acts as a kind of null value.
|
||||
Prior to the 2020b release, it was called the <code>TYPE</code> field, though
|
||||
it had not been used in the main data since the 2000e release.
|
||||
An obsolescent supplementary file used the
|
||||
field as a proof-of-concept to allow <code>zic</code> to apply a given Rule
|
||||
line only to certain “types” of years within the specified range as
|
||||
dictated by the output of a separate script, such as: only years which would
|
||||
have a US presidential election, or only years which wouldn’t.
|
||||
|
||||
<p>The <code>SAVE</code> column contains the local (wall clock) offset from
|
||||
local standard time.
|
||||
This is usually either zero for standard time or one hour for daylight
|
||||
saving time; but there’s no reason, in principle, why it can’t
|
||||
take on other values.
|
||||
|
||||
<p>The <code>LETTER</code> (sometimes called <code>LETTER/S</code>)
|
||||
column can contain a variable
|
||||
part of the usual abbreviation of the time zone’s name, or it can just
|
||||
be a hyphen if there’s no variable part. For example, the abbreviation
|
||||
used in the central time zone will be either “CST” or
|
||||
“CDT”. The variable part is ‘S’ or ‘D’;
|
||||
and, sure enough, that’s just what we find in
|
||||
the <code>LETTER</code> column
|
||||
in the <code>Chicago</code> rules. More about this when we talk about
|
||||
“Zone” lines.
|
||||
|
||||
<p>One important thing to notice is that “Rule” lines
|
||||
want at once to be both <i>transitions</i> and <i>steady states</i>:
|
||||
<ul>
|
||||
<li>On the one hand, they represent transitions between standard and
|
||||
daylight saving time; and any number of Rule lines can be in effect
|
||||
during a given period (which will always be a non-empty set of
|
||||
contiguous calendar years).</li>
|
||||
<li>On the other hand, the <code>SAVE</code> and <code>LETTER</code>
|
||||
columns contain state that exists between transitions. More about this
|
||||
when we talk about the US rules.</li>
|
||||
</ul>
|
||||
|
||||
<p>In the example above, the transition to daylight saving time
|
||||
happened on the 13<small><sup>th</sup></small> of June in 1920, and on
|
||||
the last Sunday in March in 1921; but the return to standard time
|
||||
happened on the last Sunday in October in both of those
|
||||
years. Similarly, the rule for changing to daylight saving time was
|
||||
the same from 1922 to 1966; but the rule for returning to standard
|
||||
time changed in 1955. Got it?</p>
|
||||
|
||||
<p>OK, now for the somewhat more interesting “US” rules:</p>
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<th colspan="6">From the Source File</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="6">
|
||||
<table class="rule">
|
||||
<tr><td style="border:none;text-align:left">
|
||||
<pre class="td">
|
||||
#Rule NAME FROM TO - IN ON AT SAVE LETTER/S
|
||||
Rule US 1918 1919 - Mar lastSun 2:00 1:00 D
|
||||
Rule US 1918 1919 - Oct lastSun 2:00 0 S
|
||||
Rule US 1942 only - Feb 9 2:00 1:00 W # War
|
||||
Rule US 1945 only - Aug 14 23:00u 1:00 P # Peace
|
||||
Rule US 1945 only - Sep 30 2:00 0 S
|
||||
Rule US 1967 2006 - Oct lastSun 2:00 0 S
|
||||
Rule US 1967 1973 - Apr lastSun 2:00 1:00 D
|
||||
Rule US 1974 only - Jan 6 2:00 1:00 D
|
||||
Rule US 1975 only - Feb 23 2:00 1:00 D
|
||||
Rule US 1976 1986 - Apr lastSun 2:00 1:00 D
|
||||
Rule US 1987 2006 - Apr Sun>=1 2:00 1:00 D
|
||||
Rule US 2007 max - Mar Sun>=8 2:00 1:00 D
|
||||
Rule US 2007 max - Nov Sun>=1 2:00 0 S
|
||||
</pre>
|
||||
</td></tr></table></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th colspan="6">Reformatted a Bit</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>From</th>
|
||||
<th>To</th>
|
||||
<th colspan="2">On</th>
|
||||
<th>At</th>
|
||||
<th>Action</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td rowspan="2">1918</td>
|
||||
<td rowspan="2">1919</td>
|
||||
<td rowspan="2">last Sunday</td>
|
||||
<td>in March</td>
|
||||
<td rowspan="3">02:00 local</td>
|
||||
<td>go to daylight saving time</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>in October</td>
|
||||
<td>return to standard time</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2">1942 only</td>
|
||||
<td colspan="2">February 9<small><sup>th</sup></small></td>
|
||||
<td>go to “war time”</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" rowspan="2">1945 only</td>
|
||||
<td colspan="2">August 14<small><sup>th</sup></small></td>
|
||||
<td>23:00 <a href="https://en.wikipedia.org/wiki/Universal_Time">UT</a></td>
|
||||
<td>
|
||||
rename “war time” to “peace<br>time;”
|
||||
clocks don’t change
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2">September 30<small><sup>th</sup></small></td>
|
||||
<td rowspan="9">02:00 local</td>
|
||||
<td rowspan="2">return to standard time</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td rowspan="2">1967</td>
|
||||
<td>2006</td>
|
||||
<td rowspan="2">last Sunday</td>
|
||||
<td>in October</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>1973</td>
|
||||
<td>in April</td>
|
||||
<td rowspan="6">go to daylight saving time</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2">1974 only</td>
|
||||
<td colspan="2">January 6<small><sup>th</sup></small></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2">1975 only</td>
|
||||
<td colspan="2">February 23<small><sup>rd</sup></small></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>1976</td>
|
||||
<td>1986</td>
|
||||
<td>last Sunday</td>
|
||||
<td rowspan="2">in April</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>1987</td>
|
||||
<td>2006</td>
|
||||
<td>first Sunday</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td rowspan="2">2007</td>
|
||||
<td rowspan="2">present</td>
|
||||
<td colspan="2">second Sunday in March</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2">first Sunday in November</td>
|
||||
<td>return to standard time</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<p>There are two interesting things to note here.</p>
|
||||
|
||||
<p>First, the time that something happens (in the <code>AT</code>
|
||||
column) is not necessarily the local (wall clock) time. The time can be
|
||||
suffixed with ‘s’ (for “standard”) to mean
|
||||
local standard time, different from local (wall clock) time when observing
|
||||
daylight saving time; or it can be suffixed with ‘g’,
|
||||
‘u’, or ‘z’, all three of which mean the
|
||||
standard time at the
|
||||
<a href="https://en.wikipedia.org/wiki/Prime_Meridian">prime meridian</a>.
|
||||
‘g’ stands for “<a
|
||||
href="https://en.wikipedia.org/wiki/Greenwich_Mean_Time">GMT</a>”;
|
||||
‘u’ stands for “<a
|
||||
href="https://en.wikipedia.org/wiki/Universal_Time">UT</a>” or “<a
|
||||
href="https://en.wikipedia.org/wiki/Coordinated_Universal_Time">UTC</a>”
|
||||
(whichever was official at the time); ‘z’ stands for the
|
||||
<a href="https://en.wikipedia.org/wiki/Nautical_time">nautical time zone</a>
|
||||
Z (a.k.a. “Zulu” which, in turn, stands for ‘Z’).
|
||||
The time can also be suffixed with ‘w’ meaning local (wall
|
||||
clock) time; but it usually isn’t because that’s the
|
||||
default.</p>
|
||||
|
||||
<p>Second, the day in the <code>ON</code> column, in addition to
|
||||
“<code>lastSun</code>” or a particular day of the month,
|
||||
can have the form, “<code>Sun>=</code><i>x</i>” or
|
||||
“<code>Sun<=</code><i>x</i>,” where <i>x</i> is a day
|
||||
of the month. For example, “<code>Sun>=8</code>” means
|
||||
“the first Sunday on or after the eighth of the month,” in
|
||||
other words, the second Sunday of the month. Furthermore, although
|
||||
there are no examples above, the weekday needn’t be
|
||||
“<code>Sun</code>” in either form, but can be the usual
|
||||
three-character English abbreviation for any day of the week.</p>
|
||||
|
||||
<p>And the US rules give us more examples of a couple of things
|
||||
already mentioned:</p>
|
||||
|
||||
<ul>
|
||||
<li>The rules for changing to and from daylight saving time are
|
||||
actually <i>different sets</i> of rules; and the two sets can change
|
||||
independently. Consider, for example, that the rule for the return to
|
||||
standard time stayed the same from 1967 to 2006; but the rule for the
|
||||
transition to daylight saving time changed several times in the same
|
||||
period. There can also be periods, 1946 to 1966 for example, when no
|
||||
rule from this group is in effect, and so either no transition
|
||||
happened in those years, or some other rule is in effect (perhaps a
|
||||
state or other more local rule).</li>
|
||||
|
||||
<li>The <code>SAVE</code> and <code>LETTER</code> columns
|
||||
contain <i>steady state</i>, not transitions. Consider, for example,
|
||||
the transition from “war time” to “peace time”
|
||||
that happened on August 14, 1945. The “1:00” in
|
||||
the <code>SAVE</code> column is <i>not</i> an instruction to advance
|
||||
the clock an hour. It means that clocks should <i>be</i> one hour
|
||||
ahead of standard time, which they already are because of the previous
|
||||
rule, so there should be no change.</li>
|
||||
|
||||
</ul>
|
||||
|
||||
<p>OK, now let’s look at a Zone record:</p>
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<th colspan="5">From the Source File</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="5">
|
||||
<table class="rule">
|
||||
<tr><td style="border:none;text-align:left">
|
||||
<pre class="td">
|
||||
#Zone NAME STDOFF RULES FORMAT [UNTIL]
|
||||
Zone America/Chicago -5:50:36 - LMT 1883 Nov 18 12:09:24
|
||||
-6:00 US C%sT 1920
|
||||
-6:00 Chicago C%sT 1936 Mar 1 2:00
|
||||
-5:00 - EST 1936 Nov 15 2:00
|
||||
-6:00 Chicago C%sT 1942
|
||||
-6:00 US C%sT 1946
|
||||
-6:00 Chicago C%sT 1967
|
||||
-6:00 US C%sT
|
||||
</pre>
|
||||
</td></tr></table></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th colspan="5">Columns Renamed</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th rowspan="2">Standard Offset<br>
|
||||
from <a href="https://en.wikipedia.org/wiki/Prime_Meridian">Prime
|
||||
Meridian</a></th>
|
||||
<th rowspan="2">Daylight<br>Saving Time</th>
|
||||
<th rowspan="2">Abbreviation(s)</th>
|
||||
<th colspan="2">Ending at Local Time</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Date</th>
|
||||
<th>Time</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>−5:50:36</td>
|
||||
<td>not observed</td>
|
||||
<td>LMT</td>
|
||||
<td>1883-11-18</td>
|
||||
<td>12:09:24</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td rowspan="2">−6:00:00</td>
|
||||
<td>US rules</td>
|
||||
<td rowspan="2">CST or CDT</td>
|
||||
<td>1920-01-01</td>
|
||||
<td>00:00:00</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Chicago rules</td>
|
||||
<td>1936-03-01</td>
|
||||
<td rowspan="2">02:00:00</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>−5:00:00</td>
|
||||
<td>not observed</td>
|
||||
<td>EST</td>
|
||||
<td>1936-11-15</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td rowspan="4">−6:00:00</td>
|
||||
<td>Chicago rules</td>
|
||||
<td>CST or CDT</td>
|
||||
<td>1942-01-01</td>
|
||||
<td rowspan="3">00:00:00</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>US rules</td>
|
||||
<td>CST, CWT or CPT</td>
|
||||
<td>1946-01-01</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Chicago rules</td>
|
||||
<td rowspan="2">CST or CDT</td>
|
||||
<td>1967-01-01</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>US rules</td>
|
||||
<td colspan="2">—</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<p>There are a couple of interesting differences between Zones and Rules.</p>
|
||||
|
||||
<p>First, and somewhat trivially, whereas Rules are considered to
|
||||
contain one or more records, a Zone is considered to be a single
|
||||
record with zero or more <i>continuation lines</i>. Thus, the keyword,
|
||||
“<code>Zone</code>,” and the zone name are not
|
||||
repeated. The last line is the one without anything in
|
||||
the <code>[UNTIL]</code> column.</p>
|
||||
|
||||
<p>Second, and more fundamentally, each line of a Zone represents a
|
||||
steady state, not a transition between states. The state exists from
|
||||
the date and time in the previous line’s <code>[UNTIL]</code>
|
||||
column up to the date and time in the current
|
||||
line’s <code>[UNTIL]</code> column. In other words, the date and
|
||||
time in the <code>[UNTIL]</code> column is the instant that separates
|
||||
this state from the next. Where that would be ambiguous because
|
||||
we’re setting our clocks back, the <code>[UNTIL]</code> column
|
||||
specifies the first occurrence of the instant. The state specified by
|
||||
the last line, the one without anything in the <code>[UNTIL]</code>
|
||||
column, continues to the present.</p>
|
||||
|
||||
<p>The first line typically specifies the mean solar time observed
|
||||
before the introduction of standard time. Since there’s no line before
|
||||
that, it has no beginning. <code>8-) </code> For some places near the <a
|
||||
href="https://en.wikipedia.org/wiki/International_Date_Line">International
|
||||
Date Line</a>, the first <i>two</i> lines will show solar times
|
||||
differing by 24 hours; this corresponds to a movement of the Date
|
||||
Line. For example:</p>
|
||||
|
||||
<pre>
|
||||
#Zone NAME STDOFF RULES FORMAT [UNTIL]
|
||||
Zone America/Juneau 15:02:19 - LMT 1867 Oct 18
|
||||
-8:57:41 - LMT ...
|
||||
</pre>
|
||||
|
||||
<p>When Alaska was purchased from Russia in 1867, the Date Line moved
|
||||
from the Alaska/Canada border to the Bering Strait; and the time in
|
||||
Alaska was then 24 hours earlier than it had
|
||||
been. <code><aside></code>(6 October in the Julian calendar,
|
||||
which Russia was still using then for religious reasons, was followed
|
||||
by <i>a second instance of the same day with a different name</i>, 18
|
||||
October in the Gregorian calendar. Isn’t civil time
|
||||
wonderful? <code>8-)</code>)<code></aside></code></p>
|
||||
|
||||
<p>The abbreviation, “LMT” stands for “local mean
|
||||
time”, which is an invention of
|
||||
the <a href="https://en.wikipedia.org/wiki/Tz_database">tz
|
||||
database</a> and was probably never actually used during the
|
||||
period. Furthermore, the value is almost certainly wrong except in the
|
||||
archetypal place after which the zone is named. (The tz database
|
||||
usually doesn’t provide a separate Zone record for places where
|
||||
nothing significant happened after 1970.)</p>
|
||||
|
||||
<p>The <code>RULES</code> column tells us whether daylight saving time is being observed:
|
||||
<ul>
|
||||
<li>A hyphen, a kind of null value, means that we have not set our
|
||||
clocks ahead of standard time.</li>
|
||||
|
||||
<li>An amount of time (usually but not necessarily “1:00”
|
||||
meaning one hour) means that we have set our clocks ahead by that
|
||||
amount.</li>
|
||||
|
||||
<li>Some alphabetic string means that we <i>might have</i> set our
|
||||
clocks ahead; and we need to check the rule the name of which is the
|
||||
given alphabetic string.</li>
|
||||
</ul>
|
||||
|
||||
<p>An example of a specific amount of time is:</p>
|
||||
<pre>
|
||||
#Zone NAME STDOFF RULES FORMAT [UNTIL]
|
||||
Zone Pacific/Honolulu ... 1933 Apr 30 2:00
|
||||
-10:30 1:00 HDT 1933 May 21 12:00
|
||||
...
|
||||
</pre>
|
||||
|
||||
<p>Hawaii tried daylight saving time for three weeks in 1933 and
|
||||
decided they didn’t like it. <code>8-) </code>Note that
|
||||
the <code>STDOFF</code> column always contains the standard time
|
||||
offset, so the local (wall clock) time during this period was GMT −
|
||||
10:30 + 1:00 = GMT − 9:30.</p>
|
||||
|
||||
<p>The <code>FORMAT</code> column specifies the usual abbreviation of
|
||||
the time zone name. It should have one of four forms:</p>
|
||||
<ul>
|
||||
|
||||
<li>a time zone abbreviation that is a string of three or more
|
||||
characters that are either ASCII alphanumerics,
|
||||
“<code>+</code>”, or “<code>-</code>”</li>
|
||||
|
||||
<li>the string “%z”, in which case the
|
||||
“<code>%z</code>” will be replaced by a numeric time zone
|
||||
abbreviation</li>
|
||||
|
||||
<li>a pair of time zone abbreviations separated by a slash
|
||||
(‘<code>/</code>’), in which case the first string is the
|
||||
abbreviation for the standard time name and the second string is the
|
||||
abbreviation for the daylight saving time name</li>
|
||||
|
||||
<li>a string containing “<code>%s</code>”, in which case
|
||||
the “<code>%s</code>” will be replaced by the text in the
|
||||
appropriate Rule’s <code>LETTER</code> column, and the resulting
|
||||
string should be a time zone abbreviation</li>
|
||||
</ul>
|
||||
|
||||
<p>The last two make sense only if there’s a named rule in effect.</p>
|
||||
|
||||
<p>An example of a slash is:</p>
|
||||
<pre>
|
||||
#Zone NAME STDOFF RULES FORMAT [UNTIL]
|
||||
Zone Europe/London ... 1996
|
||||
0:00 EU GMT/BST
|
||||
</pre>
|
||||
|
||||
<p>The current time in the UK is called either Greenwich mean time or
|
||||
British summer time.</p>
|
||||
|
||||
<p>One wrinkle, not fully explained in <code>zic.8.txt</code>, is what
|
||||
happens when switching to a named rule. To what values should
|
||||
the <code>SAVE</code> and <code>LETTER</code> data be initialized?</p>
|
||||
|
||||
<ul>
|
||||
<li>If at least one transition has happened, use
|
||||
the <code>SAVE</code> and <code>LETTER</code> data from the most
|
||||
recent.</li>
|
||||
|
||||
<li>If switching to a named rule before any transition has happened,
|
||||
assume standard time (<code>SAVE</code> zero), and use
|
||||
the <code>LETTER</code> data from the earliest transition with
|
||||
a <code>SAVE</code> of zero.
|
||||
|
||||
</ul>
|
||||
|
||||
<p>And three last things about the <code>FORMAT</code> column:</p>
|
||||
<ul>
|
||||
|
||||
<li>The <a href="https://en.wikipedia.org/wiki/Tz_database">tz
|
||||
database</a> gives abbreviations for time zones in <i>popular
|
||||
usage</i>, which is not necessarily “correct” by law. For
|
||||
example, the last line in
|
||||
<code>Zone</code> <code>Pacific/Honolulu</code> (shown below) gives
|
||||
“HST” for “Hawaii standard time” even though the
|
||||
<a href="https://www.law.cornell.edu/uscode/text/15/263">legal</a>
|
||||
name for that time zone is “Hawaii-Aleutian standard time.”
|
||||
This author has read that there are also some places in Australia where
|
||||
popular time zone names differ from the legal ones.
|
||||
|
||||
<li>No attempt is made to <a
|
||||
href="https://en.wikipedia.org/wiki/Internationalization_and_localization">localize</a>
|
||||
the abbreviations. They are intended to be the values returned through the
|
||||
<code>"%Z"</code> format specifier to
|
||||
<a href="https://en.wikipedia.org/wiki/C_(programming_language)">C</a>’s
|
||||
<a href="https://pubs.opengroup.org/onlinepubs/9699919799/functions/strftime.html"><code>strftime</code></a>
|
||||
function in the
|
||||
<a href="https://kirste.userpage.fu-berlin.de/chemnet/use/info/libc/libc_19.html#SEC324">“C” locale</a>.
|
||||
|
||||
<li>If there is no generally-accepted abbreviation for a time zone,
|
||||
a numeric offset is used instead, e.g., <code>+07</code> for 7 hours
|
||||
ahead of Greenwich. By convention, <code>-00</code> is used in a
|
||||
zone while uninhabited, where the offset is zero but in some sense
|
||||
the true offset is undefined.
|
||||
</ul>
|
||||
|
||||
<p>As a final example, here’s the complete history for Hawaii:</p>
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<th colspan="6">Relevant Excerpts from the US Rules</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="6">
|
||||
<table class="rule">
|
||||
<tr><td style="border:none;text-align:left">
|
||||
<pre class="td">
|
||||
#Rule NAME FROM TO - IN ON AT SAVE LETTER/S
|
||||
Rule US 1918 1919 - Oct lastSun 2:00 0 S
|
||||
Rule US 1942 only - Feb 9 2:00 1:00 W # War
|
||||
Rule US 1945 only - Aug 14 23:00u 1:00 P # Peace
|
||||
Rule US 1945 only - Sep lastSun 2:00 0 S
|
||||
</pre>
|
||||
</td></tr></table></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th colspan="6">The Zone Record</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="6">
|
||||
<table class="rule">
|
||||
<tr><td style="border:none;text-align:left">
|
||||
<pre class="td">
|
||||
#Zone NAME STDOFF RULES FORMAT [UNTIL]
|
||||
Zone Pacific/Honolulu -10:31:26 - LMT 1896 Jan 13 12:00
|
||||
-10:30 - HST 1933 Apr 30 2:00
|
||||
-10:30 1:00 HDT 1933 May 21 2:00
|
||||
-10:30 US H%sT 1947 Jun 8 2:00
|
||||
-10:00 - HST
|
||||
</pre>
|
||||
</td></tr></table></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th colspan="6">What We Infer</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th rowspan="2">Wall-Clock<br>Offset from<br>Prime Meridian</th>
|
||||
<th rowspan="2">Adjust<br>Clocks</th>
|
||||
<th colspan="2">Time Zone</th>
|
||||
<th colspan="2">Ending at Local Time</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Abbrv.</th>
|
||||
<th>Name</th>
|
||||
<th>Date</th>
|
||||
<th>Time</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>−10:31:26</td>
|
||||
<td>—</td>
|
||||
<td>LMT</td>
|
||||
<td>local mean time</td>
|
||||
<td>1896-01-13</td>
|
||||
<td>12:00</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>−10:30</td>
|
||||
<td>+0:01:26</td>
|
||||
<td>HST</td>
|
||||
<td>Hawaii standard time</td>
|
||||
<td>1933-04-30</td>
|
||||
<td>02:00</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>−9:30</td>
|
||||
<td>+1:00</td>
|
||||
<td>HDT</td>
|
||||
<td>Hawaii daylight time</td>
|
||||
<td>1933-05-21</td>
|
||||
<td>12:00</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>−10:30¹</td>
|
||||
<td>−1:00¹</td>
|
||||
<td>HST¹</td>
|
||||
<td>Hawaii standard time</td>
|
||||
<td>1942-02-09</td>
|
||||
<td>02:00</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td rowspan="2">−9:30</td>
|
||||
<td>+1:00</td>
|
||||
<td>HWT</td>
|
||||
<td>Hawaii war time</td>
|
||||
<td>1945-08-14</td>
|
||||
<td>13:30²</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>0</td>
|
||||
<td>HPT</td>
|
||||
<td>Hawaii peace time</td>
|
||||
<td>1945-09-30</td>
|
||||
<td rowspan="2">02:00</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>−10:30</td>
|
||||
<td>−1:00</td>
|
||||
<td rowspan="2">HST</td>
|
||||
<td rowspan="2">Hawaii standard time</td>
|
||||
<td>1947-06-08</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>−10:00³</td>
|
||||
<td>+0:30³</td>
|
||||
<td colspan="2">—</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="6" class="footnote">
|
||||
¹Switching to US rules…most recent transition (in 1919) was to standard time
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="6" class="footnote">
|
||||
²23:00 <a href="https://en.wikipedia.org/wiki/Universal_Time">UT</a>
|
||||
+ (−9:30) = 13:30 local
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="6" class="footnote">
|
||||
³Since <a href="https://en.wikipedia.org/wiki/ISO_8601">1947–06–08T12:30Z</a>,
|
||||
the civil time in Hawaii has been
|
||||
<a href="https://en.wikipedia.org/wiki/Universal_Time">UT</a>/<a href="https://en.wikipedia.org/wiki/Coordinated_Universal_Time">UTC</a>
|
||||
− 10:00 year-round.
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<p>There will be a short quiz later. <code>8-)</code></p>
|
||||
|
||||
<hr>
|
||||
<address>
|
||||
This web page is in the public domain, so clarified as of
|
||||
2015-10-20 by Bill Seymour.
|
||||
<br>
|
||||
All suggestions and corrections will be welcome; all flames will be amusing.
|
||||
Mail to was at pobox dot com.
|
||||
</address>
|
||||
</body>
|
||||
</html>
|
678
tz-link.htm
678
tz-link.htm
@ -1,678 +0,0 @@
|
||||
<!DOCTYPE html
|
||||
PUBLIC "-//W3C//DTD HTML 4.01//EN"
|
||||
"http://www.w3.org/TR/html4/strict.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<title>Sources for Time Zone and Daylight Saving Time Data</title>
|
||||
<link rel="schema.DC" href="http://purl.org/DC/elements/1.1/">
|
||||
<meta http-equiv="Content-type" content='text/html; charset="US-ASCII"'>
|
||||
<meta name="DC.Creator" content="Eggert, Paul">
|
||||
<meta name="DC.Contributor" content="Olson, Arthur David">
|
||||
<meta name="DC.Date" content="2007-12-26">
|
||||
<meta name="DC.Description"
|
||||
content="Sources of information about time zones and daylight saving time">
|
||||
<meta name="DC.Identifier" content="http://www.twinsun.com/tz/tz-link.htm">
|
||||
<meta name="Keywords"
|
||||
content="database,daylight saving,DST,time zone,timezone,tz,zoneinfo">
|
||||
</head>
|
||||
<body>
|
||||
<h1>Sources for Time Zone and Daylight Saving Time Data</h1>
|
||||
<address>
|
||||
@(#)tz-link.htm 8.30
|
||||
</address>
|
||||
<p>
|
||||
This file is in the public domain, so clarified as of
|
||||
2009-05-17 by Arthur David Olson.
|
||||
</p>
|
||||
<p>
|
||||
Please send corrections to this web page to the
|
||||
<a href="mailto:tz@elsie.nci.nih.gov">time zone mailing list</a>.</p>
|
||||
<h2>The <code>tz</code> database</h2>
|
||||
<p>
|
||||
The <a href="http://en.wikipedia.org/wiki/Public_domain">public-domain</a>
|
||||
time zone database contains code and data
|
||||
that represent the history of local time
|
||||
for many representative locations around the globe.
|
||||
It is updated periodically to reflect changes made by political bodies
|
||||
to <a href="http://en.wikipedia.org/wiki/Time_zone">time zone</a>
|
||||
boundaries, <a
|
||||
href="http://en.wikipedia.org/wiki/Coordinated_Universal_Time"><abbr
|
||||
title="Coordinated Universal Time">UTC</abbr></a> offsets, and
|
||||
<a href="http://en.wikipedia.org/wiki/Daylight_saving">daylight-saving</a>
|
||||
rules.
|
||||
This database (often called <code>zoneinfo</code> or <a
|
||||
href="http://en.wikipedia.org/wiki/TZ_database"><code>tz</code></a>)
|
||||
is used by several implementations,
|
||||
including
|
||||
<a href="http://www.gnu.org/software/libc/">the
|
||||
<abbr title="GNU's Not Unix">GNU</abbr>
|
||||
C Library</a> used in
|
||||
<a href="http://www.linux.org/"><abbr>GNU</abbr>/Linux</a>,
|
||||
<a href="http://www.freebsd.org/">FreeBSD</a>,
|
||||
<a href="http://netbsd.org/">NetBSD</a>,
|
||||
<a href="http://openbsd.org/">OpenBSD</a>,
|
||||
<a href="http://cygwin.com/">Cygwin</a>,
|
||||
<a href="http://www.delorie.com/djgpp/"><abbr
|
||||
title="DJ's GNU Programming Platform">DJGPP</abbr></a>,
|
||||
<a href="http://ibm.com/aix">AIX</a>,
|
||||
<a href="http://www.apple.com/macosx/">Mac OS X</a>,
|
||||
<a href="http://h71000.www7.hp.com/">OpenVMS</a>,
|
||||
<a href="http://oracle.com/database">Oracle Database</a>,
|
||||
<a href="http://sun.com/software/solaris">Solaris</a>,
|
||||
<a href="http://h30097.www3.hp.com/">Tru64</a>, and
|
||||
<a href="http://sco.com/products/unixware">UnixWare</a>.</p>
|
||||
<p>
|
||||
Each location in the database represents a national region where all
|
||||
clocks keeping local time have agreed since 1970.
|
||||
Locations are identified by continent or ocean and then by the name of
|
||||
the location, which is typically the largest city within the region.
|
||||
For example, <code>America/New_York</code>
|
||||
represents most of the <abbr title="United States">US</abbr> eastern time zone;
|
||||
<code>America/Phoenix</code> represents most of Arizona, which
|
||||
uses mountain time without daylight saving time (<abbr
|
||||
title="daylight saving time">DST</abbr>);
|
||||
<code>America/Detroit</code> represents most of Michigan, which uses
|
||||
eastern time but with different <abbr>DST</abbr> rules in 1975;
|
||||
and other entries represent smaller regions like Starke County,
|
||||
Indiana, which switched from central to eastern time in 1991
|
||||
and switched back in 2006.
|
||||
To use the database on an extended <a
|
||||
href="http://en.wikipedia.org/wiki/POSIX"><abbr
|
||||
title="Portable Operating System Interface">POSIX</abbr></a>
|
||||
implementation set the <code>TZ</code> environment variable to
|
||||
the location's full name, e.g., <code>TZ="America/New_York"</code>.</p>
|
||||
<p>
|
||||
In the <code>tz</code> database's
|
||||
<a href="ftp://elsie.nci.nih.gov/pub"><abbr
|
||||
title="File Transfer Protocol">FTP</abbr> distribution</a>
|
||||
the code is in the file <code>tzcode<var>C</var>.tar.gz</code>,
|
||||
where <code><var>C</var></code> is the code's version;
|
||||
similarly, the data are in <code>tzdata<var>D</var>.tar.gz</code>,
|
||||
where <code><var>D</var></code> is the data's version.
|
||||
Each version is a four-digit year followed by lower-case letters
|
||||
(a through z, then za through zz, then zza through zzz, and so on).
|
||||
The following <a
|
||||
href="http://en.wikipedia.org/wiki/Unix_shell">shell</a> commands download
|
||||
these files to a <abbr>GNU</abbr>/Linux or similar host;
|
||||
see the downloaded
|
||||
<code>README</code> file for what to do next.</p>
|
||||
<pre style="margin-left: 2em"><code><a href="http://www.gnu.org/software/wget/">wget</a> 'ftp://elsie.nci.nih.gov/pub/tz*.tar.gz'
|
||||
<a href="http://www.gnu.org/software/gzip/">gzip</a> -dc tzcode*.tar.gz | <a href="http://www.gnu.org/software/tar/">tar</a> -xf -
|
||||
gzip -dc tzdata*.tar.gz | tar -xf -
|
||||
</code></pre>
|
||||
<p>
|
||||
The code lets you compile the <code>tz</code> source files into
|
||||
machine-readable binary files, one for each location. It also lets
|
||||
you read a <code>tz</code> binary file and interpret time stamps for that
|
||||
location.</p>
|
||||
<p>
|
||||
The data are by no means authoritative. If you find errors, please
|
||||
send changes to the <a href="mailto:tz@elsie.nci.nih.gov">time zone
|
||||
mailing list</a>. You can also <a
|
||||
href="http://news.gmane.org/gmane.comp.time.tz">browse recent
|
||||
messages</a> sent to the mailing list, <a
|
||||
href="mailto:tz-request@elsie.nci.nih.gov">subscribe</a> to it,
|
||||
retrieve the <a
|
||||
href="ftp://elsie.nci.nih.gov/pub/tzarchive.gz">full archive of old
|
||||
messages</a> (in gzip compressed format), or retrieve <a
|
||||
href="ftp://munnari.oz.au/pub/oldtz">archived older versions of code
|
||||
and data</a>.</p>
|
||||
<p>
|
||||
The Web has several other sources for time zone and daylight saving time data.
|
||||
Here are some recent links that may be of interest.
|
||||
</p>
|
||||
<h2>Web pages using recent versions of the <code>tz</code> database</h2>
|
||||
<p>
|
||||
These are listed roughly in ascending order of complexity and fanciness.
|
||||
</p>
|
||||
<ul>
|
||||
<li>
|
||||
<a href="http://permatime.com">
|
||||
Permatime</a>
|
||||
is a service for generating and viewing links that refer to a
|
||||
particular point in time and can be displayed in multiple timezones.
|
||||
It uses the ruby tzinfo gem.
|
||||
(From Tim Diggins, 2009-11-03.)
|
||||
</li>
|
||||
<li><a href="http://twiki.org/cgi-bin/xtra/tzdatepick.html">Date and Time Gateway</a>
|
||||
lets you see the <code>TZ</code> values directly.</li>
|
||||
<li><a
|
||||
href="http://convertit.com/Go/ConvertIt/World_Time/Current_Time.ASP">Current
|
||||
Time in 1000 Places</a> uses descriptions of the values.</li>
|
||||
<li><a href="http://www.timezoneconverter.com/">Time Zone Converter</a>
|
||||
uses a pulldown menu.</li>
|
||||
<li><a href="http://home.tiscali.nl/~t876506/TZworld.html">Complete
|
||||
timezone information for all countries</a> displays tables of DST rules.
|
||||
<li><a href="http://timeanddate.com/worldclock/">The World Clock -
|
||||
Time Zones</a> lets you sort zone names and convert times.</li>
|
||||
<li><a href="http://daylight-savings-time.info/">Graphical Display of
|
||||
Time Zones and Daylight Saving Times</a> shows a graph of time
|
||||
difference versus time for any pair of locations.</li>
|
||||
<li>The <a href="http://worldtimeengine.com/">World Time Engine</a>
|
||||
also contains data about time zone boundaries; it supports queries via place
|
||||
names and shows location maps.</li>
|
||||
<li><a href="http://simpletimerclocks.mozdev.org/">Simple Timer + Clocks</a>
|
||||
is a Firefox add-on which uses a timezone data file generated from the
|
||||
tz data files.</li>
|
||||
</ul>
|
||||
<h2>Other time zone database formats</h2>
|
||||
<ul>
|
||||
<li>The <a href="ftp://ftp.rfc-editor.org/in-notes/rfc2445.txt">
|
||||
Internet Calendaring and Scheduling Core Object Specification
|
||||
(iCalendar)</a>, Internet <abbr title="Request For
|
||||
Comments">RFC</abbr> 2445, published by the (now-concluded) <a
|
||||
href="http://ietf.org/html.charters/OLD/calsch-charter.html"><abbr
|
||||
title="Internet Engineering Task Force">IETF</abbr>
|
||||
Calendaring and Scheduling Working Group (<abbr
|
||||
title="Calendaring and Scheduling Working Group">calsch</abbr>)</a>
|
||||
covers time zone
|
||||
data; see its VTIMEZONE calendar component.
|
||||
The <a href="http://calconnect.org/">Calendaring and Scheduling
|
||||
Consortium</a> is promoting further work in this area. <a
|
||||
href="http://calconnect.org/publications/icalendartimezoneproblemsandrecommendationsv1.0.pdf">iCalendar
|
||||
TIMEZONE Problems and Recommendations</a> offers guidelines and
|
||||
recommendations for the use of VTIMEZONE and <code>tz</code>.</li>
|
||||
<li><a href="http://calconnect.org/dstlinks.shtml">Extended Daylight
|
||||
Saving Time Links, Advisories and Changes</a> lists vendor material on recent
|
||||
daylight saving time changes.</li>
|
||||
<li><a
|
||||
href="http://calconnect.org/publications/timezoneregistryandservicerecommendationsv1.0.pdf">Timezone
|
||||
Registry and Service Recommendations</a> discusses a
|
||||
strategy for defining and deploying a time zone
|
||||
registration process that would establish unique names for each
|
||||
version of each <code>tz</code> zone, along with a polygonal
|
||||
representation of the geographical area corresponding to the
|
||||
zone.</li>
|
||||
<li>The <a
|
||||
href="http://lists.w3.org/Archives/Public/www-rdf-calendar/">www-rdf-calendar</a>
|
||||
list discusses <a
|
||||
href="http://www.w3.org/RDF/"><abbr
|
||||
title="Resource Description Framework">RDF</abbr></a>-based calendar
|
||||
and group scheduling systems, and has a <a
|
||||
href="http://www.w3.org/2002/12/cal/#tzd">workspace on time zone
|
||||
data</a> converted from <code>tz</code>. An earlier <a
|
||||
href="http://www.w3.org/2000/01/foo">schema</a> was sketched out.</li>
|
||||
</ul>
|
||||
<h2>Other <code>tz</code> compilers</h2>
|
||||
<ul>
|
||||
<li><a href="http://www.dachaplin.dsl.pipex.com/vzic/">Vzic iCalendar
|
||||
Timezone Converter</a> describes a <a
|
||||
href="http://en.wikipedia.org/wiki/C_%28programming_language%29">C</a>
|
||||
program that compiles
|
||||
<code>tz</code> source into iCalendar-compatible VTIMEZONE files.
|
||||
Vzic is freely
|
||||
available under the <a
|
||||
href="http://www.gnu.org/copyleft/gpl.html"><abbr>GNU</abbr>
|
||||
General Public License (<abbr
|
||||
title="General Public License">GPL</abbr>)</a>.</li>
|
||||
<li><a href="http://sourceforge.net/projects/tzical">tziCal - tz
|
||||
database conversion utility</a> is like Vzic, except for the <a
|
||||
href="http://msdn.microsoft.com/netframework">.NET framework</a>.</li>
|
||||
<li><a
|
||||
href="http://search.cpan.org/dist/DateTime-TimeZone/">DateTime::TimeZone</a>
|
||||
contains a script <code>parse_olson</code> that compiles
|
||||
<code>tz</code> source into <a href="http://www.perl.org/">Perl</a>
|
||||
modules. It is part of the Perl <a
|
||||
href="http://datetime.perl.org/">DateTime Project</a>, which is freely
|
||||
available under both the <abbr>GPL</abbr> and the Perl Artistic
|
||||
License. DateTime::TimeZone also contains a script
|
||||
<code>tests_from_zdump</code> that generates test cases for each clock
|
||||
transition in the <code>tz</code> database.</li>
|
||||
<li><a href="http://icu-project.org/">International Components for
|
||||
Unicode (<abbr>ICU</abbr>)</a> contains C/C++ and <a
|
||||
href="http://en.wikipedia.org/wiki/Java_%28programming_language%29">Java</a>
|
||||
libraries for internationalization that
|
||||
has a compiler from <code>tz</code> source
|
||||
into an <abbr>ICU</abbr>-specific format.
|
||||
<abbr>ICU</abbr> is freely available under a
|
||||
<abbr title="Berkeley Software Distribution">BSD</abbr>-style license.</li>
|
||||
<li><a href="http://joda-time.sourceforge.net/">Joda Time - Java date
|
||||
and time <abbr title="Application Program Interface">API</abbr></a>
|
||||
contains a class
|
||||
<code>org.joda.time.tz.ZoneInfoCompiler</code> that compiles
|
||||
<code>tz</code> source into a Joda-specific binary format. Joda Time
|
||||
is freely available under a <abbr>BSD</abbr>-style license.</li>
|
||||
<li><a href="http://pytz.sourceforge.net">PyTZ - Python Time
|
||||
Zone Library</a> compiles <code>tz</code> source into
|
||||
<a href="http://python.org/">Python</a>.
|
||||
It is freely available under a <abbr>BSD</abbr>-style license.</li>
|
||||
<li><a href="http://tzinfo.rubyforge.org/">TZInfo - Ruby Timezone Library</a>
|
||||
compiles <code>tz</code> source into
|
||||
<a href="http://ruby-lang.org">Ruby</a>.
|
||||
It is freely available under the <abbr
|
||||
title="Massachusetts Institute of Technology">MIT</abbr> license.</li>
|
||||
<li>The <a href="http://chronos-st.org/">Chronos Date/Time
|
||||
Library</a> is a <a href="http://smalltalk.org">Smalltalk</a> class
|
||||
library that compiles <code>tz</code> source into a <a
|
||||
href="http://date-time-zone.com/">time zone repository</a> whose format
|
||||
is either proprietary or an <a href="http://www.w3.org/XML/"><abbr
|
||||
title="Extensible Markup Language">XML</abbr></a>-encoded
|
||||
representation.</li>
|
||||
<li>Starting with version 8.5, <a href="http://tcl.tk/">Tcl</a>
|
||||
contains a developer-oriented parser that compiles <samp>tz</samp>
|
||||
source into text files, along with a runtime that can read those
|
||||
files. Tcl is freely available under a <abbr>BSD</abbr>-style
|
||||
license.</li>
|
||||
</ul>
|
||||
<h2>Other <code>tz</code> binary file readers</h2>
|
||||
<ul>
|
||||
<li>The <a
|
||||
href="http://www.gnu.org/software/libc/"><abbr>GNU</abbr> C
|
||||
Library</a>
|
||||
has an independent, thread-safe implementation of
|
||||
a <code>tz</code> binary file reader.
|
||||
This library is freely available under the
|
||||
<a href="http://www.gnu.org/copyleft/lesser.html">
|
||||
<abbr>GNU</abbr> Lesser General Public License
|
||||
(<abbr title="Lesser General Public License">LGPL</abbr>)</a>,
|
||||
and is widely used in <abbr>GNU</abbr>/Linux systems.</li>
|
||||
<li><a href="http://bmsi.com/java/#TZ">ZoneInfo.java</a>
|
||||
is a <code>tz</code> binary file reader written in Java.
|
||||
It is freely available under the <abbr>LGPL</abbr>.</li>
|
||||
<li>Tcl, mentioned above, also contains a
|
||||
<code>tz</code> binary file reader.</li>
|
||||
</ul>
|
||||
<h2>Other <code>tz</code>-based time zone software</h2>
|
||||
<ul>
|
||||
<li><a href="http://stemhaus.com/firefox/foxclocks/">FoxClocks</a>
|
||||
is an extension for <a
|
||||
href="http://developer.mozilla.org/en/docs/Toolkit_API">Mozilla
|
||||
Toolkit</a> applications like <a
|
||||
href="http://mozilla.com/firefox">Firefox</a>, <a
|
||||
href="http://mozilla.com/thunderbird">Thunderbird</a>, and
|
||||
<a
|
||||
href="http://www.mozilla.org/projects/calendar/sunbird/">Sunbird</a>.
|
||||
It displays multiple clocks in the application window, and has a mapping
|
||||
interface to <a href="http://earth.google.com/">Google Earth</a>.
|
||||
It is freely available under the <abbr>GPL</abbr>.</li>
|
||||
<li><a
|
||||
href="http://users.skynet.be/Peter.Verthez/projects/intclock/">International
|
||||
clock (intclock)</a> is a multi-timezone clock for
|
||||
<abbr>GNU</abbr>/Linux and similar systems. It is freely available
|
||||
under the <abbr>GPL</abbr>.</li>
|
||||
<li><a href="http://codeplex.com/publicdomain">PublicDomain</a>
|
||||
has a copy of a recent <code>tz</code> database, accessed via a <a
|
||||
href="http://en.wikipedia.org/wiki/C_Sharp">C#</a> library. As its
|
||||
name suggests, it is in the public domain. Only current time stamps
|
||||
are well supported; historical data are compiled into the runtime but
|
||||
are not easily accessible.</li>
|
||||
<li><a href="http://java.sun.com/">Sun Java</a> releases since 1.4
|
||||
contain a copy of a subset of a recent <code>tz</code> database in a
|
||||
Java-specific format.</li>
|
||||
<li><a href="http://kimmo.suominen.com/sw/timezone/">Time Zone</a> is
|
||||
a <a href="http://wordpress.org/">WordPress</a> plugin. It is freely
|
||||
available under a <abbr>BSD</abbr>-style license.</li>
|
||||
<li><a
|
||||
href="http://veladg.com/velaterra.html">VelaTerra</a> is
|
||||
a Mac OS X program. Its developers
|
||||
<a href="http://veladg.com/tzoffer.html">offer free
|
||||
licenses</a> to <code>tz</code> contributors.</li>
|
||||
<li><a
|
||||
href="http://worldtimeexplorer.com/">World Time Explorer</a> is a
|
||||
Microsoft Windows program.</li>
|
||||
<li>
|
||||
<a href="http://www.toriasoft.com">
|
||||
WorldClock for Windows and Windows Mobile</a>
|
||||
lets users "see the time in up to 25 locations in the world at once."
|
||||
(From Hans Nieuwenhuis, 2009-11-02.)
|
||||
</li>
|
||||
</ul>
|
||||
<h2>Other time zone databases</h2>
|
||||
<ul>
|
||||
<li><a href="http://www.astro.com/cgi/aq.cgi">Atlas Query</a>
|
||||
is Astrodienst's Web version of Shanks's
|
||||
excellent time zone history atlases published in both <a
|
||||
href="http://astrocom.com/products/software.php?software_id=ibmwboth">computer</a>
|
||||
and book form (<a
|
||||
href="http://astrocom.com/products/book.php?book_id=b110x">one volume
|
||||
for the USA</a>, and <a
|
||||
href="http://astrocom.com/products/book.php?book_id=b112x">one for
|
||||
other locations</a>) by <a
|
||||
href="http://astrocom.com/">Astro Communications Services</a>.</li>
|
||||
<li><a href="http://worldtime.com/">WORLDTIME: interactive atlas,
|
||||
time info, public holidays</a>
|
||||
contains information on local time, sunrise and sunset,
|
||||
and public holidays in several hundred cities around the world.</li>
|
||||
<li><a href="http://worldtimeserver.com/">World Time Server</a>
|
||||
is another time zone database.</li>
|
||||
<li><a href="http://tycho.usno.navy.mil/tzones.html">World Time Zones</a>
|
||||
contains data from the Time Service Department of the
|
||||
<abbr>US</abbr> Naval Observatory, used as the source
|
||||
for the <code>usno*</code> files in the <code>tz</code> distribution.</li>
|
||||
<li>The <a href="http://iata.org/ps/publications/SSIM.htm">Standard
|
||||
Schedules Information Manual</a> of the
|
||||
<a href="http://iata.org/index.htm">International Air Transport
|
||||
Association</a>
|
||||
gives current time zone rules for airports served by commercial aviation.</li>
|
||||
<li>Some Microsoft Windows versions contain time zone information in
|
||||
an undocumented format, with IDs that can be mapped to <code>TZ</code>
|
||||
values using the <a
|
||||
href="http://unicode.org/cldr/data/diff/supplemental/windows_tzid.html">Windows
|
||||
→ Tzid table</a> maintained by the <abbr
|
||||
title="Common Locale Data Repository">CLDR</abbr> data mentioned
|
||||
below.</li>
|
||||
<li>
|
||||
<a href="http://code.google.com/p/tzdata/">
|
||||
http://code.google.com/p/tzdata/
|
||||
</a>
|
||||
provides programming-language-specific representations of timezone
|
||||
data. Currently this includes XML, PHP, Ruby, Javascript, JSON and CSV
|
||||
formatted data. The repository is updated as soon as the FTP
|
||||
distribution is updated. All data can be downloaded as a zip and/or it
|
||||
can be obtained/synced via anonymous SVN. Data is made available under
|
||||
the MIT license. (From Rich Tibbett.)
|
||||
</li>
|
||||
</ul>
|
||||
<h2>Maps</h2>
|
||||
<ul>
|
||||
<li>The <a href="https://www.cia.gov/">United States Central
|
||||
Intelligence Agency (<abbr
|
||||
title="Central Intelligence Agency">CIA</abbr>)</a> publishes a <a
|
||||
href="https://www.cia.gov/library/publications/the-world-factbook/reference_maps/pdf/time_zones.pdf">time
|
||||
zone map</a>; the
|
||||
<a
|
||||
href="http://www.lib.utexas.edu/maps/world.html">Perry-Castañeda
|
||||
Library Map Collection</a>
|
||||
of the University of Texas at Austin has copies of
|
||||
recent editions.
|
||||
The pictorial quality is good,
|
||||
but the maps do not indicate summer time,
|
||||
and parts of the data are a few years out of date.</li>
|
||||
<li><a href="http://worldtimezone.com/">Current time around the world
|
||||
and standard time zones map of the world</a>
|
||||
has several fancy time zone maps; it covers Russia particularly well.
|
||||
The maps' pictorial quality is not quite as good as the
|
||||
<abbr>CIA</abbr>'s
|
||||
but the maps are more up to date.</li>
|
||||
</ul>
|
||||
<h2>Time zone boundaries</h2>
|
||||
<ul>
|
||||
<li><a href="http://efele.net/maps/tz/">TZ timezone maps</a> contains a <a
|
||||
href="http://en.wikipedia.org/wiki/Shapefile">shapefile</a> of the
|
||||
<code>tz</code> regions in the world.</li>
|
||||
<li><a href="http://statoids.com/statoids.html">Administrative Divisions
|
||||
of Countries ("Statoids")</a> contains detailed lists of
|
||||
<code>tz</code>-related zone subdivision data.</li>
|
||||
<li><a href="http://home.tiscali.nl/~t876506/Multizones.html">Time
|
||||
zone boundaries for multizone countries</a> summarizes legal
|
||||
boundaries between time zones within countries.</li>
|
||||
<li>Manifold.net's <a
|
||||
href="http://www.manifold.net/download/freemaps.html">Free Maps and
|
||||
<abbr title="Geographic Information Systems">GIS</abbr>
|
||||
Data</a> includes a Manifold-format map of
|
||||
world time zone boundaries distributed under the
|
||||
<abbr>GPL</abbr>.</li>
|
||||
<li>The <abbr>US</abbr> Geological Survey's National Atlas of
|
||||
the United States
|
||||
publishes the <a href="http://nationalatlas.gov/mld/timeznp.html">Time
|
||||
Zones of the United States</a> in the public domain.</li>
|
||||
<li>The GeoCommunity lists several commercial sources for <a
|
||||
href="http://spatialnews.geocomm.com/features/timezones/">International
|
||||
Time Zones and Time Zone Data</a>.</li>
|
||||
<li>A ship within the <a
|
||||
href="http://en.wikipedia.org/wiki/Territorial_waters">territorial
|
||||
waters</a> of any nation uses that nation's time. In international
|
||||
waters, time zone boundaries are meridians 15° apart, except that
|
||||
UTC−12 and UTC+12 are each 7.5° wide and are separated by
|
||||
the 180° meridian (not by the International Date Line, which is
|
||||
for land and territorial waters only). A captain can change ship's
|
||||
clocks any time after entering a new time zone; midnight changes are
|
||||
common.</li>
|
||||
</ul>
|
||||
<h2>Civil time concepts and history</h2>
|
||||
<ul>
|
||||
<li><a href="http://physics.nist.gov/GenInt/Time/time.html">A
|
||||
Walk through Time</a>
|
||||
surveys the evolution of timekeeping.</li>
|
||||
<li><a href="http://webexhibits.org/daylightsaving/">About Daylight
|
||||
Saving Time - History, rationale, laws & dates</a>
|
||||
is an overall history of <abbr>DST</abbr>.</li>
|
||||
<li><a href="http://energy.ca.gov/daylightsaving.html">Saving Time,
|
||||
Saving Energy</a> discusses a primary justification for <abbr>DST</abbr>.</li>
|
||||
<li><a href="http://seizethedaylight.com/dst/">Who Knew? A Brief
|
||||
History of Daylight Saving Time</a> summarizes some of the contentious
|
||||
history of <abbr>DST</abbr>.</li>
|
||||
<li><a href="http://toi.iriti.cnr.it/">The
|
||||
Time of Internet</a>
|
||||
describes time zones and daylight saving time,
|
||||
with diagrams.
|
||||
The time zone map is out of date, however.</li>
|
||||
<li><a href="http://www.phys.uu.nl/~vgent/idl/idl.htm">A History of
|
||||
the International Date Line</a> tells the story of the most important
|
||||
time zone boundary.</li>
|
||||
<li><a href="http://statoids.com/tconcept.html">Basic Time
|
||||
Zone Concepts</a> discusses terminological issues behind time zones.</li>
|
||||
</ul>
|
||||
<h2>National histories of legal time</h2>
|
||||
<dl>
|
||||
<dt>Australia</dt>
|
||||
<dd>The Parliamentary Library has commissioned <a
|
||||
href="http://www.aph.gov.au/LIBRARY/Pubs/rn/2006-07/07rn13.pdf">research
|
||||
note on daylight saving time in Australia</a>.
|
||||
The Bureau of Meteorology publishes a list of
|
||||
<a href="http://www.bom.gov.au/climate/averages/tables/dst_times.shtml">Implementation Dates of Daylight Savings Time within Australia</a>.</dd>
|
||||
<dt>Belgium</dt>
|
||||
<dd>The Royal Observatory of Belgium maintains a table of <a
|
||||
href="http://www.astro.oma.be/GENERAL/INFO/nli001a.html"
|
||||
hreflang="nl">time in Belgium (in Dutch)</a>.</dd>
|
||||
<dt>Brazil</dt>
|
||||
<dd>The Time Service Department of the National Observatory
|
||||
records <a href="http://pcdsh01.on.br/DecHV.html"
|
||||
hreflang="pt-BR">Brazil's daylight saving time decrees (in
|
||||
Portuguese)</a>.</dd>
|
||||
<dt>Canada</dt>
|
||||
<dd>The Institute for National Measurement Standards publishes current
|
||||
and some older information about <a
|
||||
href="http://inms-ienm.nrc-cnrc.gc.ca/time_services/daylight_saving_e.html">Time
|
||||
Zones & Daylight Saving Time</a>.</dd>
|
||||
<dt>Chile</dt>
|
||||
<dd>The Chilean Hydrographic and Oceanographic Service publishes a <a
|
||||
href="http://www.horaoficial.cl/horaof.htm" hreflang="es"> history of
|
||||
official time (in Spanish)</a>.</dd>
|
||||
<dt>Germany</dt>
|
||||
<dd>The National Institute for Science and Technology maintains the <a
|
||||
href="http://www.ptb.de/en/org/4/44/441/dars_e.htm">Realisation of
|
||||
Legal Time in Germany</a>.</dd>
|
||||
<dt>Israel</dt>
|
||||
<dd>The Interior Ministry periodically issues <a
|
||||
href="ftp://ftp.cs.huji.ac.il/pub/tz/announcements"
|
||||
hreflang="he">announcements (in Hebrew)</a>.</dd>
|
||||
<dt>Mexico</dt>
|
||||
<dd>The Investigation and Analysis Service of the Mexican Library of
|
||||
Congress has published a <a
|
||||
href="http://www.cddhcu.gob.mx/bibliot/publica/inveyana/polisoc/horver/"
|
||||
hreflang="es">history of Mexican local time (in Spanish)</a>.</dd>
|
||||
<dt>Malaysia</dt>
|
||||
<dd>See Singapore below.</dd>
|
||||
<dt>Netherlands</dt>
|
||||
<dd><a href="http://www.phys.uu.nl/~vgent/wettijd/wettijd.htm"
|
||||
hreflang="nl">Legal time in the Netherlands (in Dutch)</a>
|
||||
covers the history of local time in the Netherlands from ancient times.</dd>
|
||||
<dt>New Zealand</dt>
|
||||
<dd>The Department of Internal Affairs maintains a brief history <a
|
||||
href="http://dia.govt.nz/diawebsite.nsf/wpg_URL/Resource-material-Information-We-Provide-About-Daylight-Saving">About
|
||||
Daylight Saving</a>. The privately-maintained <a
|
||||
href="http://astrologyschool.com/nztime.html">History of New Zealand
|
||||
time</a> has more details.</dd>
|
||||
<dt>Norway</dt>
|
||||
<dd>The Norwegian Meteorological Institute lists
|
||||
<a href="http://met.no/met/met_lex/q_u/sommertid.html" hreflang="no">Summer
|
||||
time in Norway (in Norwegian)</a>, citing the
|
||||
Institute of Theoretical Astrophysics, Oslo.</dd>
|
||||
<dt>Singapore</dt>
|
||||
<dd><a
|
||||
href="http://www.math.nus.edu.sg/aslaksen/teaching/timezone.html">Why
|
||||
is Singapore in the "Wrong" Time Zone?</a> details the
|
||||
history of legal time in Singapore and Malaysia.</dd>
|
||||
<dt>United Kingdom</dt>
|
||||
<dd><a
|
||||
href="http://www.srcf.ucam.org/~jsm28/british-time/">History of
|
||||
legal time in Britain</a> discusses in detail the country
|
||||
with perhaps the best-documented history of clock adjustments.
|
||||
The National Physical Laboratory also maintains an <a
|
||||
href="http://www.npl.co.uk/server.php?show=ConWebDoc.2714">Archive
|
||||
of Summer time dates</a>.</dd>
|
||||
</dl>
|
||||
<h2>Precision timekeeping</h2>
|
||||
<ul>
|
||||
<li><a
|
||||
href="http://literature.agilent.com/litweb/pdf/5965-7984E.pdf">The
|
||||
Science of Timekeeping</a> is a thorough introduction
|
||||
to the theory and practice of precision timekeeping.</li>
|
||||
<li><a href="http://www.ntp.org/"><abbr
|
||||
title="Network Time Protocol">NTP</abbr>: The Network
|
||||
Time Protocol</a>
|
||||
discusses how to synchronize clocks of
|
||||
Internet hosts.</li>
|
||||
<li><a
|
||||
href="ftp://ftp.rfc-editor.org/in-notes/rfc4833.txt">Timezone
|
||||
Options for <abbr title="Dynamic Host Configuration Protocol">DHCP</abbr></a>
|
||||
(Internet <abbr>RFC</abbr> 4833)
|
||||
specifies a <a
|
||||
href="http://www.dhcp.org/">DHCP</a> option for a server to configure
|
||||
a client's time zone and daylight saving settings automatically.</li>
|
||||
<li><a href="http://gauss.gge.unb.ca/GMT.UT.and.the.RGO.html">A Few
|
||||
Facts Concerning <abbr title="Greenwich Mean Time">GMT</abbr>, <abbr
|
||||
title="Universal Time">UT</abbr>, and
|
||||
the <abbr title="Royal Greenwich Observatory">RGO</abbr></a>
|
||||
answers questions like "What is the
|
||||
difference between <abbr>GMT</abbr> and <abbr>UTC</abbr>?"</li>
|
||||
<li><a
|
||||
href="http://www.cv.nrao.edu/~rfisher/Ephemerides/times.html">Astronomical
|
||||
Times</a> explains more abstruse astronomical time scales like
|
||||
<abbr title="Terrestrial Dynamic Time">TDT</abbr>,
|
||||
<abbr title="Geocentric Coordinate Time">TCG</abbr>, and
|
||||
<abbr title="Barycentric Dynamic Time">TDB</abbr>.
|
||||
<a href="http://www.ucolick.org/~sla/leapsecs/timescales.html">Time
|
||||
Scales</a> goes into more detail, particularly for historical variants.</li>
|
||||
<li>The <a href="http://iau.org/"><abbr
|
||||
title="International Astronomical Union">IAU</abbr></a>'s <a
|
||||
href="http://www.iau-sofa.rl.ac.uk/"><abbr
|
||||
title="Standards Of Fundamental Astronomy">SOFA</abbr></a>
|
||||
initiative publishes Fortran
|
||||
code for converting among time scales like
|
||||
<abbr title="International Atomic Time">TAI</abbr>,
|
||||
<abbr>TDB</abbr>, <abbr>TDT</abbr> and
|
||||
<abbr>UTC</abbr>.</li>
|
||||
<li><a href="http://jpl.nasa.gov/basics/bsf2-3.htm">Basics of
|
||||
Space Flight - Reference Systems - Time Conventions</a>
|
||||
briefly explains interplanetary space flight timekeeping.</li>
|
||||
<li><a
|
||||
href="http://www.giss.nasa.gov/tools/mars24/help/notes.html">Technical
|
||||
Notes on Mars Solar Time as Adopted by the Mars24 Sunclock</a> briefly
|
||||
describes Mars Coordinated Time (<abbr
|
||||
title="Mars Coordinated Time">MTC</abbr>) and the
|
||||
diverse local time
|
||||
scales used by each landed mission on Mars.</li>
|
||||
<li><a href="http://leapsecond.com/">LeapSecond.com</a> is
|
||||
dedicated not only to leap seconds but to precise time and frequency
|
||||
in general. It covers the state of the art in amateur timekeeping, and
|
||||
how the art has progressed over the past few decades.</li>
|
||||
<li><a
|
||||
href="http://hpiers.obspm.fr/eop-pc/products/bulletins/bulletins.html">Bulletins
|
||||
maintained by the
|
||||
<abbr title="International Earth Rotation Service">IERS</abbr>
|
||||
<abbr title="Earth Orientation Parameters">EOP</abbr>
|
||||
(<abbr title="Product Center">PC</abbr>)</a> contains official publications of
|
||||
the Earth Orientation Parameters Product Center of the
|
||||
International Earth Rotation Service, the committee that decides
|
||||
when leap seconds occur.</li>
|
||||
<li>The <a
|
||||
href="http://six.pairlist.net/mailman/listinfo/leapsecs">Leap
|
||||
Second Discussion List</a> covers <a
|
||||
href="http://gauss.gge.unb.ca/papers.pdf/gpsworld.november99.pdf">McCarthy
|
||||
and Klepczynski's proposal to discontinue leap seconds</a>,
|
||||
discussed further in
|
||||
<a href="http://www.cl.cam.ac.uk/~mgk25/time/metrologia-leapsecond.pdf">The
|
||||
leap second: its history and possible future</a>.
|
||||
The (now disbanded) <a href="http://members.aas.org/comms/leap.cfm"><abbr
|
||||
title="American Astronomical Society">AAS</abbr> Leap Second
|
||||
Committee</a> has solicited input on this proposal.
|
||||
<a href="http://www.ucolick.org/~sla/leapsecs/">The
|
||||
Future of Leap Seconds</a> covers this
|
||||
contentious issue.</li>
|
||||
</ul>
|
||||
<h2>Time notation</h2>
|
||||
<ul>
|
||||
<li>
|
||||
<a href="http://www.cl.cam.ac.uk/~mgk25/iso-time.html">A Summary of
|
||||
the International Standard Date and Time Notation</a> is a good
|
||||
summary of
|
||||
<a
|
||||
href="http://www.iso.org/iso/en/CatalogueDetailPage.CatalogueDetail?CSNUMBER=40874"><abbr
|
||||
title="International Organization for Standardization">ISO</abbr>
|
||||
8601:2004 -- Data elements and interchange formats -- Information
|
||||
interchange -- Representation of dates and times</a>.</li>
|
||||
<li>
|
||||
<a href="http://www.w3.org/TR/xmlschema-2/#dateTime"><abbr>XML</abbr>
|
||||
Schema: Datatypes - dateTime</a> specifies a format inspired by
|
||||
<abbr>ISO</abbr> 8601 that is in common use in XML data.</li>
|
||||
<li>
|
||||
<a href="ftp://ftp.rfc-editor.org/in-notes/rfc2822.txt">Internet
|
||||
Message Format</a> (Internet <abbr>RFC</abbr> 2822) §3.3
|
||||
specifies the time notation used in email and <a
|
||||
href="ftp://ftp.rfc-editor.org/in-notes/rfc2616.txt"><abbr>HTTP</abbr></a>
|
||||
headers.</li>
|
||||
<li>
|
||||
<a href="ftp://ftp.rfc-editor.org/in-notes/rfc3339.txt">Date and Time
|
||||
on the Internet: Timestamps</a> (Internet <abbr>RFC</abbr> 3339)
|
||||
specifies an <abbr>ISO</abbr> 8601
|
||||
profile for use in new Internet
|
||||
protocols.</li>
|
||||
<li>
|
||||
<a href="http://www.hackcraft.net/web/datetime/">Date & Time
|
||||
Formats on the Web</a> surveys web- and Internet-oriented date and time
|
||||
formats.</li>
|
||||
<li>
|
||||
<a href="http://exit109.com/~ghealton/y2k/yrexamples.html">The
|
||||
Best of Dates, the Worst of Dates</a> covers many problems encountered
|
||||
by software developers when handling dates and time stamps.</li>
|
||||
<li>The <a
|
||||
href="http://unicode.org/cldr/">Unicode Common Locale Data Repository
|
||||
(<abbr>CLDR</abbr>) Project</a> has localizations for time zone names,
|
||||
abbreviations, identifiers, and formats. For example, it contains
|
||||
French translations for "Eastern European Summer Time", "<abbr
|
||||
title="Eastern European Summer Time">EEST</abbr>", and
|
||||
"Bucharest". <a
|
||||
href="http://unicode.org/cldr/data/charts/by_type/names.metazone.html">By-Type
|
||||
Chart: names.metazone</a> shows these values for many locales.
|
||||
<abbr>ICU</abbr> contains a mechanism for using this data.</li>
|
||||
<li>Alphabetic time zone abbreviations should not be used as unique
|
||||
identifiers for <abbr>UTC</abbr> offsets as they are ambiguous in
|
||||
practice. For example, "<abbr>EST</abbr>" denotes 5 hours behind
|
||||
<abbr>UTC</abbr> in English-speaking North America, but it denotes 10
|
||||
or 11 hours ahead of <abbr>UTC</abbr> in Australia; and
|
||||
French-speaking North Americans prefer
|
||||
"<abbr title="Heure Normale de l'Est">HNE</abbr>" to
|
||||
"<abbr>EST</abbr>". For <abbr>POSIX</abbr> the <code>tz</code>
|
||||
database contains English abbreviations for all time stamps but in
|
||||
many cases these are merely inventions of the database
|
||||
maintainers.</li>
|
||||
<li>Numeric time zone abbreviations typically count hours east of
|
||||
<abbr>UTC</abbr>, e.g., <code>+09</code> for Japan and
|
||||
<code>-10</code> for Hawaii. However, the <abbr>POSIX</abbr>
|
||||
<code>TZ</code> environment variable uses the opposite convention. For
|
||||
example, one might use <code>TZ="JST-9"</code> and
|
||||
<code>TZ="HST10"</code> for Japan and Hawaii, respectively. If the
|
||||
<code>tz</code> database is available, it is usually better to use
|
||||
settings like <code>TZ="Asia/Tokyo"</code> and
|
||||
<code>TZ="Pacific/Honolulu"</code> instead, as this should avoid
|
||||
confusion, handle old time stamps better, and insulate you better from
|
||||
any future changes to the rules. One should never set
|
||||
<abbr>POSIX</abbr> <code>TZ</code> to a value like
|
||||
<code>"GMT-9"</code>, though, since this would falsely claim that
|
||||
local time is nine hours ahead of <abbr>UTC</abbr> and the time zone
|
||||
is called "<abbr>GMT</abbr>".</li>
|
||||
</ul>
|
||||
<h2>Related indexes</h2>
|
||||
<ul>
|
||||
<li><a href="tz-art.htm">Time and the Arts</a></li>
|
||||
<li><a href="http://www.dmoz.org/Reference/Time/">Open Directory -
|
||||
Reference: Time</a></li>
|
||||
<li><a href="http://directory.google.com/Top/Reference/Time/">Google Directory
|
||||
- Reference > Time</a></li>
|
||||
<li><a href="http://dir.yahoo.com/Science/Measurements_and_Units/Time">Yahoo!
|
||||
Directory > Science > Measurements and Units > Time</a></li>
|
||||
</ul>
|
||||
</body>
|
||||
</html>
|
1175
tz-link.html
Normal file
1175
tz-link.html
Normal file
File diff suppressed because it is too large
Load Diff
554
tzfile.5
554
tzfile.5
@ -1,152 +1,496 @@
|
||||
.TH TZFILE 5
|
||||
.SH NAME
|
||||
tzfile \- time zone information
|
||||
.SH SYNOPSIS
|
||||
.B
|
||||
#include <tzfile.h>
|
||||
tzfile \- timezone information
|
||||
.SH DESCRIPTION
|
||||
The time zone information files used by
|
||||
.IR tzset (3)
|
||||
begin with the magic characters "TZif" to identify them as
|
||||
time zone information files,
|
||||
followed by a character identifying the version of the file's format
|
||||
(as of 2005, either an ASCII NUL or a '2')
|
||||
followed by fifteen bytes containing zeroes reserved for future use,
|
||||
followed by six four-byte values of type
|
||||
.BR long ,
|
||||
written in a ``standard'' byte order
|
||||
(the high-order byte of the value is written first).
|
||||
These values are,
|
||||
in order:
|
||||
.ie '\(lq'' .ds lq \&"\"
|
||||
.el .ds lq \(lq\"
|
||||
.ie '\(rq'' .ds rq \&"\"
|
||||
.el .ds rq \(rq\"
|
||||
.de q
|
||||
\\$3\*(lq\\$1\*(rq\\$2
|
||||
..
|
||||
.ie \n(.g .ds - \f(CW-\fP
|
||||
.el .ds - \-
|
||||
The timezone information files used by
|
||||
.BR tzset (3)
|
||||
are typically found under a directory with a name like
|
||||
.IR /usr/share/zoneinfo .
|
||||
These files use the format described in Internet RFC 8536.
|
||||
Each file is a sequence of 8-bit bytes.
|
||||
In a file, a binary integer is represented by a sequence of one or
|
||||
more bytes in network order (bigendian, or high-order byte first),
|
||||
with all bits significant,
|
||||
a signed binary integer is represented using two's complement,
|
||||
and a boolean is represented by a one-byte binary integer that is
|
||||
either 0 (false) or 1 (true).
|
||||
The format begins with a 44-byte header containing the following fields:
|
||||
.IP * 2
|
||||
The magic four-byte ASCII sequence
|
||||
.q "TZif"
|
||||
identifies the file as a timezone information file.
|
||||
.IP *
|
||||
A byte identifying the version of the file's format
|
||||
(as of 2021, either an ASCII NUL,
|
||||
.q "2",
|
||||
.q "3",
|
||||
or
|
||||
.q "4" ).
|
||||
.IP *
|
||||
Fifteen bytes containing zeros reserved for future use.
|
||||
.IP *
|
||||
Six four-byte integer values, in the following order:
|
||||
.RS
|
||||
.TP
|
||||
.I tzh_ttisgmtcnt
|
||||
The number of UTC/local indicators stored in the file.
|
||||
.B tzh_ttisutcnt
|
||||
The number of UT/local indicators stored in the file.
|
||||
(UT is Universal Time.)
|
||||
.TP
|
||||
.I tzh_ttisstdcnt
|
||||
.B tzh_ttisstdcnt
|
||||
The number of standard/wall indicators stored in the file.
|
||||
.TP
|
||||
.I tzh_leapcnt
|
||||
The number of leap seconds for which data is stored in the file.
|
||||
.B tzh_leapcnt
|
||||
The number of leap seconds for which data entries are stored in the file.
|
||||
.TP
|
||||
.I tzh_timecnt
|
||||
The number of "transition times" for which data is stored
|
||||
.B tzh_timecnt
|
||||
The number of transition times for which data entries are stored
|
||||
in the file.
|
||||
.TP
|
||||
.I tzh_typecnt
|
||||
The number of "local time types" for which data is stored
|
||||
.B tzh_typecnt
|
||||
The number of local time types for which data entries are stored
|
||||
in the file (must not be zero).
|
||||
.TP
|
||||
.I tzh_charcnt
|
||||
The number of characters of "time zone abbreviation strings"
|
||||
.B tzh_charcnt
|
||||
The number of bytes of time zone abbreviation strings
|
||||
stored in the file.
|
||||
.RE
|
||||
.PP
|
||||
The above header is followed by
|
||||
.I tzh_timecnt
|
||||
four-byte values of type
|
||||
.BR long ,
|
||||
sorted in ascending order.
|
||||
These values are written in ``standard'' byte order.
|
||||
The above header is followed by the following fields, whose lengths
|
||||
depend on the contents of the header:
|
||||
.IP * 2
|
||||
.B tzh_timecnt
|
||||
four-byte signed integer values sorted in ascending order.
|
||||
These values are written in network byte order.
|
||||
Each is used as a transition time (as returned by
|
||||
.IR time (2))
|
||||
.BR time (2))
|
||||
at which the rules for computing local time change.
|
||||
Next come
|
||||
.I tzh_timecnt
|
||||
one-byte values of type
|
||||
.BR "unsigned char" ;
|
||||
each one tells which of the different types of ``local time'' types
|
||||
described in the file is associated with the same-indexed transition time.
|
||||
These values serve as indices into an array of
|
||||
.I ttinfo
|
||||
structures (with
|
||||
.I tzh_typecnt
|
||||
entries) that appears next in the file;
|
||||
these structures are defined as follows:
|
||||
.IP *
|
||||
.B tzh_timecnt
|
||||
one-byte unsigned integer values;
|
||||
each one but the last tells which of the different types of local time types
|
||||
described in the file is associated with the time period
|
||||
starting with the same-indexed transition time
|
||||
and continuing up to but not including the next transition time.
|
||||
(The last time type is present only for consistency checking with the
|
||||
POSIX-style TZ string described below.)
|
||||
These values serve as indices into the next field.
|
||||
.IP *
|
||||
.B tzh_typecnt
|
||||
.B ttinfo
|
||||
entries, each defined as follows:
|
||||
.in +.5i
|
||||
.sp
|
||||
.nf
|
||||
.ta .5i +\w'unsigned int\0\0'u
|
||||
.ta .5i +\w'unsigned char\0\0'u
|
||||
struct ttinfo {
|
||||
long tt_gmtoff;
|
||||
int tt_isdst;
|
||||
unsigned int tt_abbrind;
|
||||
int32_t tt_utoff;
|
||||
unsigned char tt_isdst;
|
||||
unsigned char tt_desigidx;
|
||||
};
|
||||
.in -.5i
|
||||
.fi
|
||||
.sp
|
||||
Each structure is written as a four-byte value for
|
||||
.I tt_gmtoff
|
||||
of type
|
||||
.BR long ,
|
||||
in a standard byte order, followed by a one-byte value for
|
||||
.I tt_isdst
|
||||
Each structure is written as a four-byte signed integer value for
|
||||
.BR tt_utoff ,
|
||||
in network byte order, followed by a one-byte boolean for
|
||||
.B tt_isdst
|
||||
and a one-byte value for
|
||||
.IR tt_abbrind .
|
||||
.BR tt_desigidx .
|
||||
In each structure,
|
||||
.I tt_gmtoff
|
||||
gives the number of seconds to be added to UTC,
|
||||
.I tt_isdst
|
||||
.B tt_utoff
|
||||
gives the number of seconds to be added to UT,
|
||||
.B tt_isdst
|
||||
tells whether
|
||||
.I tm_isdst
|
||||
.B tm_isdst
|
||||
should be set by
|
||||
.I localtime (3)
|
||||
.BR localtime (3)
|
||||
and
|
||||
.I tt_abbrind
|
||||
serves as an index into the array of time zone abbreviation characters
|
||||
.B tt_desigidx
|
||||
serves as an index into the array of time zone abbreviation bytes
|
||||
that follow the
|
||||
.I ttinfo
|
||||
structure(s) in the file.
|
||||
.PP
|
||||
Then there are
|
||||
.I tzh_leapcnt
|
||||
pairs of four-byte values, written in standard byte order;
|
||||
the first value of each pair gives the time
|
||||
.B ttinfo
|
||||
entries in the file; if the designated string is "\*-00", the
|
||||
.B ttinfo
|
||||
entry is a placeholder indicating that local time is unspecified.
|
||||
The
|
||||
.B tt_utoff
|
||||
value is never equal to \-2**31, to let 32-bit clients negate it without
|
||||
overflow.
|
||||
Also, in realistic applications
|
||||
.B tt_utoff
|
||||
is in the range [\-89999, 93599] (i.e., more than \-25 hours and less
|
||||
than 26 hours); this allows easy support by implementations that
|
||||
already support the POSIX-required range [\-24:59:59, 25:59:59].
|
||||
.IP *
|
||||
.B tzh_charcnt
|
||||
bytes that represent time zone designations,
|
||||
which are null-terminated byte strings, each indexed by the
|
||||
.B tt_desigidx
|
||||
values mentioned above.
|
||||
The byte strings can overlap if one is a suffix of the other.
|
||||
The encoding of these strings is not specified.
|
||||
.IP *
|
||||
.B tzh_leapcnt
|
||||
pairs of four-byte values, written in network byte order;
|
||||
the first value of each pair gives the nonnegative time
|
||||
(as returned by
|
||||
.IR time(2))
|
||||
at which a leap second occurs;
|
||||
the second gives the
|
||||
.BR time (2))
|
||||
at which a leap second occurs or at which the leap second table expires;
|
||||
the second is a signed integer specifying the correction, which is the
|
||||
.I total
|
||||
number of leap seconds to be applied after the given time.
|
||||
The pairs of values are sorted in ascending order by time.
|
||||
.PP
|
||||
Then there are
|
||||
.I tzh_ttisstdcnt
|
||||
standard/wall indicators, each stored as a one-byte value;
|
||||
number of leap seconds to be applied during the time period
|
||||
starting at the given time.
|
||||
The pairs of values are sorted in strictly ascending order by time.
|
||||
Each pair denotes one leap second, either positive or negative,
|
||||
except that if the last pair has the same correction as the previous one,
|
||||
the last pair denotes the leap second table's expiration time.
|
||||
Each leap second is at the end of a UTC calendar month.
|
||||
The first leap second has a nonnegative occurrence time,
|
||||
and is a positive leap second if and only if its correction is positive;
|
||||
the correction for each leap second after the first differs
|
||||
from the previous leap second by either 1 for a positive leap second,
|
||||
or \-1 for a negative leap second.
|
||||
If the leap second table is empty, the leap-second correction is zero
|
||||
for all timestamps;
|
||||
otherwise, for timestamps before the first occurrence time,
|
||||
the leap-second correction is zero if the first pair's correction is 1 or \-1,
|
||||
and is unspecified otherwise (which can happen only in files
|
||||
truncated at the start).
|
||||
.IP *
|
||||
.B tzh_ttisstdcnt
|
||||
standard/wall indicators, each stored as a one-byte boolean;
|
||||
they tell whether the transition times associated with local time types
|
||||
were specified as standard time or wall clock time,
|
||||
and are used when a time zone file is used in handling POSIX-style
|
||||
time zone environment variables.
|
||||
.PP
|
||||
Finally there are
|
||||
.I tzh_ttisgmtcnt
|
||||
UTC/local indicators, each stored as a one-byte value;
|
||||
were specified as standard time or local (wall clock) time.
|
||||
.IP *
|
||||
.B tzh_ttisutcnt
|
||||
UT/local indicators, each stored as a one-byte boolean;
|
||||
they tell whether the transition times associated with local time types
|
||||
were specified as UTC or local time,
|
||||
and are used when a time zone file is used in handling POSIX-style
|
||||
time zone environment variables.
|
||||
were specified as UT or local time.
|
||||
If a UT/local indicator is set, the corresponding standard/wall indicator
|
||||
must also be set.
|
||||
.PP
|
||||
.I Localtime
|
||||
uses the first standard-time
|
||||
.I ttinfo
|
||||
The standard/wall and UT/local indicators were designed for
|
||||
transforming a TZif file's transition times into transitions appropriate
|
||||
for another time zone specified via a POSIX-style TZ string that lacks rules.
|
||||
For example, when TZ="EET\*-2EEST" and there is no TZif file "EET\*-2EEST",
|
||||
the idea was to adapt the transition times from a TZif file with the
|
||||
well-known name "posixrules" that is present only for this purpose and
|
||||
is a copy of the file "Europe/Brussels", a file with a different UT offset.
|
||||
POSIX does not specify this obsolete transformational behavior,
|
||||
the default rules are installation-dependent, and no implementation
|
||||
is known to support this feature for timestamps past 2037,
|
||||
so users desiring (say) Greek time should instead specify
|
||||
TZ="Europe/Athens" for better historical coverage, falling back on
|
||||
TZ="EET\*-2EEST,M3.5.0/3,M10.5.0/4" if POSIX conformance is required
|
||||
and older timestamps need not be handled accurately.
|
||||
.PP
|
||||
The
|
||||
.BR localtime (3)
|
||||
function
|
||||
normally uses the first
|
||||
.B ttinfo
|
||||
structure in the file
|
||||
(or simply the first
|
||||
.I ttinfo
|
||||
structure in the absence of a standard-time structure)
|
||||
if either
|
||||
.I tzh_timecnt
|
||||
.B tzh_timecnt
|
||||
is zero or the time argument is less than the first transition time recorded
|
||||
in the file.
|
||||
.PP
|
||||
For version-2-format time zone files,
|
||||
the above header and data is followed by a second header and data,
|
||||
.SS Version 2 format
|
||||
For version-2-format timezone files,
|
||||
the above header and data are followed by a second header and data,
|
||||
identical in format except that
|
||||
eight bytes are used for each transition time or leap second time.
|
||||
(Leap second counts remain four bytes.)
|
||||
After the second header and data comes a newline-enclosed,
|
||||
POSIX-TZ-environment-variable-style string for use in handling instants
|
||||
after the last transition time stored in the file
|
||||
(with nothing between the newlines if there is no POSIX representation for
|
||||
such instants).
|
||||
or for all instants if the file has no transitions.
|
||||
The POSIX-style TZ string is empty (i.e., nothing between the newlines)
|
||||
if there is no POSIX-style representation for such instants.
|
||||
If nonempty, the POSIX-style TZ string must agree with the local time
|
||||
type after the last transition time if present in the eight-byte data;
|
||||
for example, given the string
|
||||
.q "WET0WEST,M3.5.0,M10.5.0/3"
|
||||
then if a last transition time is in July, the transition's local time
|
||||
type must specify a daylight-saving time abbreviated
|
||||
.q "WEST"
|
||||
that is one hour east of UT.
|
||||
Also, if there is at least one transition, time type 0 is associated
|
||||
with the time period from the indefinite past up to but not including
|
||||
the earliest transition time.
|
||||
.SS Version 3 format
|
||||
For version-3-format timezone files, the POSIX-TZ-style string may
|
||||
use two minor extensions to the POSIX TZ format, as described in
|
||||
.BR newtzset (3).
|
||||
First, the hours part of its transition times may be signed and range from
|
||||
\-167 through 167 instead of the POSIX-required unsigned values
|
||||
from 0 through 24.
|
||||
Second, DST is in effect all year if it starts
|
||||
January 1 at 00:00 and ends December 31 at 24:00 plus the difference
|
||||
between daylight saving and standard time.
|
||||
.SS Version 4 format
|
||||
For version-4-format TZif files,
|
||||
the first leap second record can have a correction that is neither
|
||||
+1 nor \-1, to represent truncation of the TZif file at the start.
|
||||
Also, if two or more leap second transitions are present and the last
|
||||
entry's correction equals the previous one, the last entry
|
||||
denotes the expiration of the leap second table instead of a leap second;
|
||||
timestamps after this expiration are unreliable in that future
|
||||
releases will likely add leap second entries after the expiration, and
|
||||
the added leap seconds will change how post-expiration timestamps are treated.
|
||||
.SS Interoperability considerations
|
||||
Future changes to the format may append more data.
|
||||
.PP
|
||||
Version 1 files are considered a legacy format and
|
||||
should not be generated, as they do not support transition
|
||||
times after the year 2038.
|
||||
Readers that understand only Version 1 must ignore
|
||||
any data that extends beyond the calculated end of the version
|
||||
1 data block.
|
||||
.PP
|
||||
Other than version 1, writers should generate
|
||||
the lowest version number needed by a file's data.
|
||||
For example, a writer should generate a version 4 file
|
||||
only if its leap second table either expires or is truncated at the start.
|
||||
Likewise, a writer not generating a version 4 file
|
||||
should generate a version 3 file only if
|
||||
TZ string extensions are necessary to accurately
|
||||
model transition times.
|
||||
.PP
|
||||
The sequence of time changes defined by the version 1
|
||||
header and data block should be a contiguous sub-sequence
|
||||
of the time changes defined by the version 2+ header and data
|
||||
block, and by the footer.
|
||||
This guideline helps obsolescent version 1 readers
|
||||
agree with current readers about timestamps within the
|
||||
contiguous sub-sequence. It also lets writers not
|
||||
supporting obsolescent readers use a
|
||||
.B tzh_timecnt
|
||||
of zero
|
||||
in the version 1 data block to save space.
|
||||
.PP
|
||||
When a TZif file contains a leap second table expiration
|
||||
time, TZif readers should either refuse to process
|
||||
post-expiration timestamps, or process them as if the expiration
|
||||
time did not exist (possibly with an error indication).
|
||||
.PP
|
||||
Time zone designations should consist of at least three (3)
|
||||
and no more than six (6) ASCII characters from the set of
|
||||
alphanumerics,
|
||||
.q "\*-",
|
||||
and
|
||||
.q "+".
|
||||
This is for compatibility with POSIX requirements for
|
||||
time zone abbreviations.
|
||||
.PP
|
||||
When reading a version 2 or higher file, readers
|
||||
should ignore the version 1 header and data block except for
|
||||
the purpose of skipping over them.
|
||||
.PP
|
||||
Readers should calculate the total lengths of the
|
||||
headers and data blocks and check that they all fit within
|
||||
the actual file size, as part of a validity check for the file.
|
||||
.PP
|
||||
When a positive leap second occurs, readers should append an extra
|
||||
second to the local minute containing the second just before the leap
|
||||
second. If this occurs when the UTC offset is not a multiple of 60
|
||||
seconds, the leap second occurs earlier than the last second of the
|
||||
local minute and the minute's remaining local seconds are numbered
|
||||
through 60 instead of the usual 59; the UTC offset is unaffected.
|
||||
.SS Common interoperability issues
|
||||
This section documents common problems in reading or writing TZif files.
|
||||
Most of these are problems in generating TZif files for use by
|
||||
older readers.
|
||||
The goals of this section are:
|
||||
.IP * 2
|
||||
to help TZif writers output files that avoid common
|
||||
pitfalls in older or buggy TZif readers,
|
||||
.IP *
|
||||
to help TZif readers avoid common pitfalls when reading
|
||||
files generated by future TZif writers, and
|
||||
.IP *
|
||||
to help any future specification authors see what sort of
|
||||
problems arise when the TZif format is changed.
|
||||
.PP
|
||||
When new versions of the TZif format have been defined, a
|
||||
design goal has been that a reader can successfully use a TZif
|
||||
file even if the file is of a later TZif version than what the
|
||||
reader was designed for.
|
||||
When complete compatibility was not achieved, an attempt was
|
||||
made to limit glitches to rarely used timestamps and allow
|
||||
simple partial workarounds in writers designed to generate
|
||||
new-version data useful even for older-version readers.
|
||||
This section attempts to document these compatibility issues and
|
||||
workarounds, as well as to document other common bugs in
|
||||
readers.
|
||||
.PP
|
||||
Interoperability problems with TZif include the following:
|
||||
.IP * 2
|
||||
Some readers examine only version 1 data.
|
||||
As a partial workaround, a writer can output as much version 1
|
||||
data as possible.
|
||||
However, a reader should ignore version 1 data, and should use
|
||||
version 2+ data even if the reader's native timestamps have only
|
||||
32 bits.
|
||||
.IP *
|
||||
Some readers designed for version 2 might mishandle
|
||||
timestamps after a version 3 or higher file's last transition, because
|
||||
they cannot parse extensions to POSIX in the TZ-like string.
|
||||
As a partial workaround, a writer can output more transitions
|
||||
than necessary, so that only far-future timestamps are
|
||||
mishandled by version 2 readers.
|
||||
.IP *
|
||||
Some readers designed for version 2 do not support
|
||||
permanent daylight saving time with transitions after 24:00
|
||||
\(en e.g., a TZ string
|
||||
.q "EST5EDT,0/0,J365/25"
|
||||
denoting permanent Eastern Daylight Time
|
||||
(\-04).
|
||||
As a workaround, a writer can substitute standard time
|
||||
for two time zones east, e.g.,
|
||||
.q "XXX3EDT4,0/0,J365/23"
|
||||
for a time zone with a never-used standard time (XXX, \-03)
|
||||
and negative daylight saving time (EDT, \-04) all year.
|
||||
Alternatively,
|
||||
as a partial workaround a writer can substitute standard time
|
||||
for the next time zone east \(en e.g.,
|
||||
.q "AST4"
|
||||
for permanent
|
||||
Atlantic Standard Time (\-04).
|
||||
.IP *
|
||||
Some readers designed for version 2 or 3, and that require strict
|
||||
conformance to RFC 8536, reject version 4 files whose leap second
|
||||
tables are truncated at the start or that end in expiration times.
|
||||
.IP *
|
||||
Some readers ignore the footer, and instead predict future
|
||||
timestamps from the time type of the last transition.
|
||||
As a partial workaround, a writer can output more transitions
|
||||
than necessary.
|
||||
.IP *
|
||||
Some readers do not use time type 0 for timestamps before
|
||||
the first transition, in that they infer a time type using a
|
||||
heuristic that does not always select time type 0.
|
||||
As a partial workaround, a writer can output a dummy (no-op)
|
||||
first transition at an early time.
|
||||
.IP *
|
||||
Some readers mishandle timestamps before the first
|
||||
transition that has a timestamp not less than \-2**31.
|
||||
Readers that support only 32-bit timestamps are likely to be
|
||||
more prone to this problem, for example, when they process
|
||||
64-bit transitions only some of which are representable in 32
|
||||
bits.
|
||||
As a partial workaround, a writer can output a dummy
|
||||
transition at timestamp \-2**31.
|
||||
.IP *
|
||||
Some readers mishandle a transition if its timestamp has
|
||||
the minimum possible signed 64-bit value.
|
||||
Timestamps less than \-2**59 are not recommended.
|
||||
.IP *
|
||||
Some readers mishandle POSIX-style TZ strings that
|
||||
contain
|
||||
.q "<"
|
||||
or
|
||||
.q ">".
|
||||
As a partial workaround, a writer can avoid using
|
||||
.q "<"
|
||||
or
|
||||
.q ">"
|
||||
for time zone abbreviations containing only alphabetic
|
||||
characters.
|
||||
.IP *
|
||||
Many readers mishandle time zone abbreviations that contain
|
||||
non-ASCII characters.
|
||||
These characters are not recommended.
|
||||
.IP *
|
||||
Some readers may mishandle time zone abbreviations that
|
||||
contain fewer than 3 or more than 6 characters, or that
|
||||
contain ASCII characters other than alphanumerics,
|
||||
.q "\*-",
|
||||
and
|
||||
.q "+".
|
||||
These abbreviations are not recommended.
|
||||
.IP *
|
||||
Some readers mishandle TZif files that specify
|
||||
daylight-saving time UT offsets that are less than the UT
|
||||
offsets for the corresponding standard time.
|
||||
These readers do not support locations like Ireland, which
|
||||
uses the equivalent of the POSIX TZ string
|
||||
.q "IST\*-1GMT0,M10.5.0,M3.5.0/1",
|
||||
observing standard time
|
||||
(IST, +01) in summer and daylight saving time (GMT, +00) in winter.
|
||||
As a partial workaround, a writer can output data for the
|
||||
equivalent of the POSIX TZ string
|
||||
.q "GMT0IST,M3.5.0/1,M10.5.0",
|
||||
thus swapping standard and daylight saving time.
|
||||
Although this workaround misidentifies which part of the year
|
||||
uses daylight saving time, it records UT offsets and time zone
|
||||
abbreviations correctly.
|
||||
.IP *
|
||||
Some readers generate ambiguous timestamps for positive leap seconds
|
||||
that occur when the UTC offset is not a multiple of 60 seconds.
|
||||
For example, in a timezone with UTC offset +01:23:45 and with
|
||||
a positive leap second 78796801 (1972-06-30 23:59:60 UTC), some readers will
|
||||
map both 78796800 and 78796801 to 01:23:45 local time the next day
|
||||
instead of mapping the latter to 01:23:46, and they will map 78796815 to
|
||||
01:23:59 instead of to 01:23:60.
|
||||
This has not yet been a practical problem, since no civil authority
|
||||
has observed such UTC offsets since leap seconds were
|
||||
introduced in 1972.
|
||||
.PP
|
||||
Some interoperability problems are reader bugs that
|
||||
are listed here mostly as warnings to developers of readers.
|
||||
.IP * 2
|
||||
Some readers do not support negative timestamps.
|
||||
Developers of distributed applications should keep this
|
||||
in mind if they need to deal with pre-1970 data.
|
||||
.IP *
|
||||
Some readers mishandle timestamps before the first
|
||||
transition that has a nonnegative timestamp.
|
||||
Readers that do not support negative timestamps are likely to
|
||||
be more prone to this problem.
|
||||
.IP *
|
||||
Some readers mishandle time zone abbreviations like
|
||||
.q "\*-08"
|
||||
that contain
|
||||
.q "+",
|
||||
.q "\*-",
|
||||
or digits.
|
||||
.IP *
|
||||
Some readers mishandle UT offsets that are out of the
|
||||
traditional range of \-12 through +12 hours, and so do not
|
||||
support locations like Kiritimati that are outside this
|
||||
range.
|
||||
.IP *
|
||||
Some readers mishandle UT offsets in the range [\-3599, \-1]
|
||||
seconds from UT, because they integer-divide the offset by
|
||||
3600 to get 0 and then display the hour part as
|
||||
.q "+00".
|
||||
.IP *
|
||||
Some readers mishandle UT offsets that are not a multiple
|
||||
of one hour, or of 15 minutes, or of 1 minute.
|
||||
.SH SEE ALSO
|
||||
newctime(3)
|
||||
.\" @(#)tzfile.5 8.3
|
||||
.BR time (2),
|
||||
.BR localtime (3),
|
||||
.BR tzset (3),
|
||||
.BR tzselect (8),
|
||||
.BR zdump (8),
|
||||
.BR zic (8).
|
||||
.PP
|
||||
Olson A, Eggert P, Murchison K. The Time Zone Information Format (TZif).
|
||||
2019 Feb.
|
||||
.UR https://\:datatracker.ietf.org/\:doc/\:html/\:rfc8536
|
||||
Internet RFC 8536
|
||||
.UE
|
||||
.UR https://\:doi.org/\:10.17487/\:RFC8536
|
||||
doi:10.17487/RFC8536
|
||||
.UE .
|
||||
.\" This file is in the public domain, so clarified as of
|
||||
.\" 1996-06-05 by Arthur David Olson.
|
||||
|
437
tzfile.5.txt
437
tzfile.5.txt
@ -1,106 +1,369 @@
|
||||
TZFILE(5) File Formats Manual TZFILE(5)
|
||||
|
||||
NAME
|
||||
|
||||
tzfile - time zone information
|
||||
|
||||
SYNOPSIS
|
||||
#include <tzfile.h>
|
||||
tzfile - timezone information
|
||||
|
||||
DESCRIPTION
|
||||
The time zone information files used by tzset(3) begin with
|
||||
the magic characters "TZif" to identify them as time zone
|
||||
information files, followed by a character identifying the
|
||||
version of the file's format (as of 2005, either an ASCII
|
||||
NUL or a '2') followed by fifteen bytes containing zeroes
|
||||
reserved for future use, followed by six four-byte values of
|
||||
type long, written in a ``standard'' byte order (the high-
|
||||
order byte of the value is written first). These values
|
||||
are, in order:
|
||||
The timezone information files used by tzset(3) are typically found
|
||||
under a directory with a name like /usr/share/zoneinfo. These files
|
||||
use the format described in Internet RFC 8536. Each file is a sequence
|
||||
of 8-bit bytes. In a file, a binary integer is represented by a
|
||||
sequence of one or more bytes in network order (bigendian, or high-
|
||||
order byte first), with all bits significant, a signed binary integer
|
||||
is represented using two's complement, and a boolean is represented by
|
||||
a one-byte binary integer that is either 0 (false) or 1 (true). The
|
||||
format begins with a 44-byte header containing the following fields:
|
||||
|
||||
tzh_ttisgmtcnt
|
||||
The number of UTC/local indicators stored in the file.
|
||||
* The magic four-byte ASCII sequence "TZif" identifies the file as a
|
||||
timezone information file.
|
||||
|
||||
tzh_ttisstdcnt
|
||||
The number of standard/wall indicators stored in the
|
||||
file.
|
||||
* A byte identifying the version of the file's format (as of 2021,
|
||||
either an ASCII NUL, "2", "3", or "4").
|
||||
|
||||
tzh_leapcnt
|
||||
The number of leap seconds for which data is stored in
|
||||
the file.
|
||||
* Fifteen bytes containing zeros reserved for future use.
|
||||
|
||||
tzh_timecnt
|
||||
The number of "transition times" for which data is
|
||||
stored in the file.
|
||||
* Six four-byte integer values, in the following order:
|
||||
|
||||
tzh_typecnt
|
||||
The number of "local time types" for which data is
|
||||
stored in the file (must not be zero).
|
||||
tzh_ttisutcnt
|
||||
The number of UT/local indicators stored in the file. (UT is
|
||||
Universal Time.)
|
||||
|
||||
tzh_charcnt
|
||||
The number of characters of "time zone abbreviation
|
||||
strings" stored in the file.
|
||||
tzh_ttisstdcnt
|
||||
The number of standard/wall indicators stored in the file.
|
||||
|
||||
The above header is followed by tzh_timecnt four-byte values
|
||||
of type long, sorted in ascending order. These values are
|
||||
written in ``standard'' byte order. Each is used as a
|
||||
transition time (as returned by time(2)) at which the rules
|
||||
for computing local time change. Next come tzh_timecnt one-
|
||||
byte values of type unsigned char; each one tells which of
|
||||
the different types of ``local time'' types described in the
|
||||
file is associated with the same-indexed transition time.
|
||||
These values serve as indices into an array of ttinfo
|
||||
structures (with tzh_typecnt entries) that appears next in
|
||||
the file; these structures are defined as follows:
|
||||
tzh_leapcnt
|
||||
The number of leap seconds for which data entries are stored
|
||||
in the file.
|
||||
|
||||
struct ttinfo {
|
||||
long tt_gmtoff;
|
||||
int tt_isdst;
|
||||
unsigned int tt_abbrind;
|
||||
};
|
||||
tzh_timecnt
|
||||
The number of transition times for which data entries are
|
||||
stored in the file.
|
||||
|
||||
Each structure is written as a four-byte value for tt_gmtoff
|
||||
of type long, in a standard byte order, followed by a one-
|
||||
byte value for tt_isdst and a one-byte value for tt_abbrind.
|
||||
In each structure, tt_gmtoff gives the number of seconds to
|
||||
be added to UTC, tt_isdst tells whether tm_isdst should be
|
||||
set by localtime (3) and tt_abbrind serves as an index into
|
||||
the array of time zone abbreviation characters that follow
|
||||
the ttinfo structure(s) in the file.
|
||||
tzh_typecnt
|
||||
The number of local time types for which data entries are
|
||||
stored in the file (must not be zero).
|
||||
|
||||
Then there are tzh_leapcnt pairs of four-byte values,
|
||||
written in standard byte order; the first value of each pair
|
||||
gives the time (as returned by time(2)) at which a leap
|
||||
second occurs; the second gives the total number of leap
|
||||
seconds to be applied after the given time. The pairs of
|
||||
values are sorted in ascending order by time.
|
||||
tzh_charcnt
|
||||
The number of bytes of time zone abbreviation strings stored
|
||||
in the file.
|
||||
|
||||
Then there are tzh_ttisstdcnt standard/wall indicators, each
|
||||
stored as a one-byte value; they tell whether the transition
|
||||
times associated with local time types were specified as
|
||||
standard time or wall clock time, and are used when a time
|
||||
zone file is used in handling POSIX-style time zone
|
||||
environment variables.
|
||||
The above header is followed by the following fields, whose lengths
|
||||
depend on the contents of the header:
|
||||
|
||||
Finally there are tzh_ttisgmtcnt UTC/local indicators, each
|
||||
stored as a one-byte value; they tell whether the transition
|
||||
times associated with local time types were specified as UTC
|
||||
or local time, and are used when a time zone file is used in
|
||||
handling POSIX-style time zone environment variables.
|
||||
* tzh_timecnt four-byte signed integer values sorted in ascending
|
||||
order. These values are written in network byte order. Each is used
|
||||
as a transition time (as returned by time(2)) at which the rules for
|
||||
computing local time change.
|
||||
|
||||
Localtime uses the first standard-time ttinfo structure in
|
||||
the file (or simply the first ttinfo structure in the
|
||||
absence of a standard-time structure) if either tzh_timecnt
|
||||
is zero or the time argument is less than the first
|
||||
transition time recorded in the file.
|
||||
* tzh_timecnt one-byte unsigned integer values; each one but the last
|
||||
tells which of the different types of local time types described in
|
||||
the file is associated with the time period starting with the same-
|
||||
indexed transition time and continuing up to but not including the
|
||||
next transition time. (The last time type is present only for
|
||||
consistency checking with the POSIX-style TZ string described below.)
|
||||
These values serve as indices into the next field.
|
||||
|
||||
For version-2-format time zone files, the above header and
|
||||
data is followed by a second header and data, identical in
|
||||
format except that eight bytes are used for each transition
|
||||
time or leap second time. After the second header and data
|
||||
comes a newline-enclosed, POSIX-TZ-environment-variable-
|
||||
style string for use in handling instants after the last
|
||||
transition time stored in the file (with nothing between the
|
||||
newlines if there is no POSIX representation for such
|
||||
instants).
|
||||
* tzh_typecnt ttinfo entries, each defined as follows:
|
||||
|
||||
struct ttinfo {
|
||||
int32_t tt_utoff;
|
||||
unsigned char tt_isdst;
|
||||
unsigned char tt_desigidx;
|
||||
};
|
||||
|
||||
Each structure is written as a four-byte signed integer value for
|
||||
tt_utoff, in network byte order, followed by a one-byte boolean for
|
||||
tt_isdst and a one-byte value for tt_desigidx. In each structure,
|
||||
tt_utoff gives the number of seconds to be added to UT, tt_isdst
|
||||
tells whether tm_isdst should be set by localtime(3) and tt_desigidx
|
||||
serves as an index into the array of time zone abbreviation bytes
|
||||
that follow the ttinfo entries in the file; if the designated string
|
||||
is "-00", the ttinfo entry is a placeholder indicating that local
|
||||
time is unspecified. The tt_utoff value is never equal to -2**31, to
|
||||
let 32-bit clients negate it without overflow. Also, in realistic
|
||||
applications tt_utoff is in the range [-89999, 93599] (i.e., more
|
||||
than -25 hours and less than 26 hours); this allows easy support by
|
||||
implementations that already support the POSIX-required range
|
||||
[-24:59:59, 25:59:59].
|
||||
|
||||
* tzh_charcnt bytes that represent time zone designations, which are
|
||||
null-terminated byte strings, each indexed by the tt_desigidx values
|
||||
mentioned above. The byte strings can overlap if one is a suffix of
|
||||
the other. The encoding of these strings is not specified.
|
||||
|
||||
* tzh_leapcnt pairs of four-byte values, written in network byte order;
|
||||
the first value of each pair gives the nonnegative time (as returned
|
||||
by time(2)) at which a leap second occurs or at which the leap second
|
||||
table expires; the second is a signed integer specifying the
|
||||
correction, which is the total number of leap seconds to be applied
|
||||
during the time period starting at the given time. The pairs of
|
||||
values are sorted in strictly ascending order by time. Each pair
|
||||
denotes one leap second, either positive or negative, except that if
|
||||
the last pair has the same correction as the previous one, the last
|
||||
pair denotes the leap second table's expiration time. Each leap
|
||||
second is at the end of a UTC calendar month. The first leap second
|
||||
has a nonnegative occurrence time, and is a positive leap second if
|
||||
and only if its correction is positive; the correction for each leap
|
||||
second after the first differs from the previous leap second by
|
||||
either 1 for a positive leap second, or -1 for a negative leap
|
||||
second. If the leap second table is empty, the leap-second
|
||||
correction is zero for all timestamps; otherwise, for timestamps
|
||||
before the first occurrence time, the leap-second correction is zero
|
||||
if the first pair's correction is 1 or -1, and is unspecified
|
||||
otherwise (which can happen only in files truncated at the start).
|
||||
|
||||
* tzh_ttisstdcnt standard/wall indicators, each stored as a one-byte
|
||||
boolean; they tell whether the transition times associated with local
|
||||
time types were specified as standard time or local (wall clock)
|
||||
time.
|
||||
|
||||
* tzh_ttisutcnt UT/local indicators, each stored as a one-byte boolean;
|
||||
they tell whether the transition times associated with local time
|
||||
types were specified as UT or local time. If a UT/local indicator is
|
||||
set, the corresponding standard/wall indicator must also be set.
|
||||
|
||||
The standard/wall and UT/local indicators were designed for
|
||||
transforming a TZif file's transition times into transitions
|
||||
appropriate for another time zone specified via a POSIX-style TZ string
|
||||
that lacks rules. For example, when TZ="EET-2EEST" and there is no
|
||||
TZif file "EET-2EEST", the idea was to adapt the transition times from
|
||||
a TZif file with the well-known name "posixrules" that is present only
|
||||
for this purpose and is a copy of the file "Europe/Brussels", a file
|
||||
with a different UT offset. POSIX does not specify this obsolete
|
||||
transformational behavior, the default rules are installation-
|
||||
dependent, and no implementation is known to support this feature for
|
||||
timestamps past 2037, so users desiring (say) Greek time should instead
|
||||
specify TZ="Europe/Athens" for better historical coverage, falling back
|
||||
on TZ="EET-2EEST,M3.5.0/3,M10.5.0/4" if POSIX conformance is required
|
||||
and older timestamps need not be handled accurately.
|
||||
|
||||
The localtime(3) function normally uses the first ttinfo structure in
|
||||
the file if either tzh_timecnt is zero or the time argument is less
|
||||
than the first transition time recorded in the file.
|
||||
|
||||
Version 2 format
|
||||
For version-2-format timezone files, the above header and data are
|
||||
followed by a second header and data, identical in format except that
|
||||
eight bytes are used for each transition time or leap second time.
|
||||
(Leap second counts remain four bytes.) After the second header and
|
||||
data comes a newline-enclosed, POSIX-TZ-environment-variable-style
|
||||
string for use in handling instants after the last transition time
|
||||
stored in the file or for all instants if the file has no transitions.
|
||||
The POSIX-style TZ string is empty (i.e., nothing between the newlines)
|
||||
if there is no POSIX-style representation for such instants. If
|
||||
nonempty, the POSIX-style TZ string must agree with the local time type
|
||||
after the last transition time if present in the eight-byte data; for
|
||||
example, given the string "WET0WEST,M3.5.0,M10.5.0/3" then if a last
|
||||
transition time is in July, the transition's local time type must
|
||||
specify a daylight-saving time abbreviated "WEST" that is one hour east
|
||||
of UT. Also, if there is at least one transition, time type 0 is
|
||||
associated with the time period from the indefinite past up to but not
|
||||
including the earliest transition time.
|
||||
|
||||
Version 3 format
|
||||
For version-3-format timezone files, the POSIX-TZ-style string may use
|
||||
two minor extensions to the POSIX TZ format, as described in
|
||||
newtzset(3). First, the hours part of its transition times may be
|
||||
signed and range from -167 through 167 instead of the POSIX-required
|
||||
unsigned values from 0 through 24. Second, DST is in effect all year
|
||||
if it starts January 1 at 00:00 and ends December 31 at 24:00 plus the
|
||||
difference between daylight saving and standard time.
|
||||
|
||||
Version 4 format
|
||||
For version-4-format TZif files, the first leap second record can have
|
||||
a correction that is neither +1 nor -1, to represent truncation of the
|
||||
TZif file at the start. Also, if two or more leap second transitions
|
||||
are present and the last entry's correction equals the previous one,
|
||||
the last entry denotes the expiration of the leap second table instead
|
||||
of a leap second; timestamps after this expiration are unreliable in
|
||||
that future releases will likely add leap second entries after the
|
||||
expiration, and the added leap seconds will change how post-expiration
|
||||
timestamps are treated.
|
||||
|
||||
Interoperability considerations
|
||||
Future changes to the format may append more data.
|
||||
|
||||
Version 1 files are considered a legacy format and should not be
|
||||
generated, as they do not support transition times after the year 2038.
|
||||
Readers that understand only Version 1 must ignore any data that
|
||||
extends beyond the calculated end of the version 1 data block.
|
||||
|
||||
Other than version 1, writers should generate the lowest version number
|
||||
needed by a file's data. For example, a writer should generate a
|
||||
version 4 file only if its leap second table either expires or is
|
||||
truncated at the start. Likewise, a writer not generating a version 4
|
||||
file should generate a version 3 file only if TZ string extensions are
|
||||
necessary to accurately model transition times.
|
||||
|
||||
The sequence of time changes defined by the version 1 header and data
|
||||
block should be a contiguous sub-sequence of the time changes defined
|
||||
by the version 2+ header and data block, and by the footer. This
|
||||
guideline helps obsolescent version 1 readers agree with current
|
||||
readers about timestamps within the contiguous sub-sequence. It also
|
||||
lets writers not supporting obsolescent readers use a tzh_timecnt of
|
||||
zero in the version 1 data block to save space.
|
||||
|
||||
When a TZif file contains a leap second table expiration time, TZif
|
||||
readers should either refuse to process post-expiration timestamps, or
|
||||
process them as if the expiration time did not exist (possibly with an
|
||||
error indication).
|
||||
|
||||
Time zone designations should consist of at least three (3) and no more
|
||||
than six (6) ASCII characters from the set of alphanumerics, "-", and
|
||||
"+". This is for compatibility with POSIX requirements for time zone
|
||||
abbreviations.
|
||||
|
||||
When reading a version 2 or higher file, readers should ignore the
|
||||
version 1 header and data block except for the purpose of skipping over
|
||||
them.
|
||||
|
||||
Readers should calculate the total lengths of the headers and data
|
||||
blocks and check that they all fit within the actual file size, as part
|
||||
of a validity check for the file.
|
||||
|
||||
When a positive leap second occurs, readers should append an extra
|
||||
second to the local minute containing the second just before the leap
|
||||
second. If this occurs when the UTC offset is not a multiple of 60
|
||||
seconds, the leap second occurs earlier than the last second of the
|
||||
local minute and the minute's remaining local seconds are numbered
|
||||
through 60 instead of the usual 59; the UTC offset is unaffected.
|
||||
|
||||
Common interoperability issues
|
||||
This section documents common problems in reading or writing TZif
|
||||
files. Most of these are problems in generating TZif files for use by
|
||||
older readers. The goals of this section are:
|
||||
|
||||
* to help TZif writers output files that avoid common pitfalls in older
|
||||
or buggy TZif readers,
|
||||
|
||||
* to help TZif readers avoid common pitfalls when reading files
|
||||
generated by future TZif writers, and
|
||||
|
||||
* to help any future specification authors see what sort of problems
|
||||
arise when the TZif format is changed.
|
||||
|
||||
When new versions of the TZif format have been defined, a design goal
|
||||
has been that a reader can successfully use a TZif file even if the
|
||||
file is of a later TZif version than what the reader was designed for.
|
||||
When complete compatibility was not achieved, an attempt was made to
|
||||
limit glitches to rarely used timestamps and allow simple partial
|
||||
workarounds in writers designed to generate new-version data useful
|
||||
even for older-version readers. This section attempts to document
|
||||
these compatibility issues and workarounds, as well as to document
|
||||
other common bugs in readers.
|
||||
|
||||
Interoperability problems with TZif include the following:
|
||||
|
||||
* Some readers examine only version 1 data. As a partial workaround, a
|
||||
writer can output as much version 1 data as possible. However, a
|
||||
reader should ignore version 1 data, and should use version 2+ data
|
||||
even if the reader's native timestamps have only 32 bits.
|
||||
|
||||
* Some readers designed for version 2 might mishandle timestamps after
|
||||
a version 3 or higher file's last transition, because they cannot
|
||||
parse extensions to POSIX in the TZ-like string. As a partial
|
||||
workaround, a writer can output more transitions than necessary, so
|
||||
that only far-future timestamps are mishandled by version 2 readers.
|
||||
|
||||
* Some readers designed for version 2 do not support permanent daylight
|
||||
saving time with transitions after 24:00 - e.g., a TZ string
|
||||
"EST5EDT,0/0,J365/25" denoting permanent Eastern Daylight Time (-04).
|
||||
As a workaround, a writer can substitute standard time for two time
|
||||
zones east, e.g., "XXX3EDT4,0/0,J365/23" for a time zone with a
|
||||
never-used standard time (XXX, -03) and negative daylight saving time
|
||||
(EDT, -04) all year. Alternatively, as a partial workaround a writer
|
||||
can substitute standard time for the next time zone east - e.g.,
|
||||
"AST4" for permanent Atlantic Standard Time (-04).
|
||||
|
||||
* Some readers designed for version 2 or 3, and that require strict
|
||||
conformance to RFC 8536, reject version 4 files whose leap second
|
||||
tables are truncated at the start or that end in expiration times.
|
||||
|
||||
* Some readers ignore the footer, and instead predict future timestamps
|
||||
from the time type of the last transition. As a partial workaround,
|
||||
a writer can output more transitions than necessary.
|
||||
|
||||
* Some readers do not use time type 0 for timestamps before the first
|
||||
transition, in that they infer a time type using a heuristic that
|
||||
does not always select time type 0. As a partial workaround, a
|
||||
writer can output a dummy (no-op) first transition at an early time.
|
||||
|
||||
* Some readers mishandle timestamps before the first transition that
|
||||
has a timestamp not less than -2**31. Readers that support only
|
||||
32-bit timestamps are likely to be more prone to this problem, for
|
||||
example, when they process 64-bit transitions only some of which are
|
||||
representable in 32 bits. As a partial workaround, a writer can
|
||||
output a dummy transition at timestamp -2**31.
|
||||
|
||||
* Some readers mishandle a transition if its timestamp has the minimum
|
||||
possible signed 64-bit value. Timestamps less than -2**59 are not
|
||||
recommended.
|
||||
|
||||
* Some readers mishandle POSIX-style TZ strings that contain "<" or
|
||||
">". As a partial workaround, a writer can avoid using "<" or ">"
|
||||
for time zone abbreviations containing only alphabetic characters.
|
||||
|
||||
* Many readers mishandle time zone abbreviations that contain non-ASCII
|
||||
characters. These characters are not recommended.
|
||||
|
||||
* Some readers may mishandle time zone abbreviations that contain fewer
|
||||
than 3 or more than 6 characters, or that contain ASCII characters
|
||||
other than alphanumerics, "-", and "+". These abbreviations are not
|
||||
recommended.
|
||||
|
||||
* Some readers mishandle TZif files that specify daylight-saving time
|
||||
UT offsets that are less than the UT offsets for the corresponding
|
||||
standard time. These readers do not support locations like Ireland,
|
||||
which uses the equivalent of the POSIX TZ string
|
||||
"IST-1GMT0,M10.5.0,M3.5.0/1", observing standard time (IST, +01) in
|
||||
summer and daylight saving time (GMT, +00) in winter. As a partial
|
||||
workaround, a writer can output data for the equivalent of the POSIX
|
||||
TZ string "GMT0IST,M3.5.0/1,M10.5.0", thus swapping standard and
|
||||
daylight saving time. Although this workaround misidentifies which
|
||||
part of the year uses daylight saving time, it records UT offsets and
|
||||
time zone abbreviations correctly.
|
||||
|
||||
* Some readers generate ambiguous timestamps for positive leap seconds
|
||||
that occur when the UTC offset is not a multiple of 60 seconds. For
|
||||
example, in a timezone with UTC offset +01:23:45 and with a positive
|
||||
leap second 78796801 (1972-06-30 23:59:60 UTC), some readers will map
|
||||
both 78796800 and 78796801 to 01:23:45 local time the next day
|
||||
instead of mapping the latter to 01:23:46, and they will map 78796815
|
||||
to 01:23:59 instead of to 01:23:60. This has not yet been a
|
||||
practical problem, since no civil authority has observed such UTC
|
||||
offsets since leap seconds were introduced in 1972.
|
||||
|
||||
Some interoperability problems are reader bugs that are listed here
|
||||
mostly as warnings to developers of readers.
|
||||
|
||||
* Some readers do not support negative timestamps. Developers of
|
||||
distributed applications should keep this in mind if they need to
|
||||
deal with pre-1970 data.
|
||||
|
||||
* Some readers mishandle timestamps before the first transition that
|
||||
has a nonnegative timestamp. Readers that do not support negative
|
||||
timestamps are likely to be more prone to this problem.
|
||||
|
||||
* Some readers mishandle time zone abbreviations like "-08" that
|
||||
contain "+", "-", or digits.
|
||||
|
||||
* Some readers mishandle UT offsets that are out of the traditional
|
||||
range of -12 through +12 hours, and so do not support locations like
|
||||
Kiritimati that are outside this range.
|
||||
|
||||
* Some readers mishandle UT offsets in the range [-3599, -1] seconds
|
||||
from UT, because they integer-divide the offset by 3600 to get 0 and
|
||||
then display the hour part as "+00".
|
||||
|
||||
* Some readers mishandle UT offsets that are not a multiple of one
|
||||
hour, or of 15 minutes, or of 1 minute.
|
||||
|
||||
SEE ALSO
|
||||
newctime(3)
|
||||
time(2), localtime(3), tzset(3), tzselect(8), zdump(8), zic(8).
|
||||
|
||||
Olson A, Eggert P, Murchison K. The Time Zone Information Format
|
||||
(TZif). 2019 Feb. Internet RFC 8536 <https://datatracker.ietf.org/
|
||||
doc/html/rfc8536> doi:10.17487/RFC8536 <https://doi.org/10.17487/
|
||||
RFC8536>.
|
||||
|
||||
TZFILE(5)
|
||||
|
125
tzfile.h
125
tzfile.h
@ -1,3 +1,5 @@
|
||||
/* Layout and location of TZif files. */
|
||||
|
||||
#ifndef TZFILE_H
|
||||
|
||||
#define TZFILE_H
|
||||
@ -15,32 +17,25 @@
|
||||
** Thank you!
|
||||
*/
|
||||
|
||||
/*
|
||||
** ID
|
||||
*/
|
||||
|
||||
#ifndef lint
|
||||
#ifndef NOID
|
||||
static char tzfilehid[] = "@(#)tzfile.h 8.1";
|
||||
#endif /* !defined NOID */
|
||||
#endif /* !defined lint */
|
||||
|
||||
/*
|
||||
** Information about time zone files.
|
||||
*/
|
||||
|
||||
#ifndef TZDIR
|
||||
#define TZDIR "/usr/local/etc/zoneinfo" /* Time zone object file directory */
|
||||
# define TZDIR "/usr/share/zoneinfo" /* Time zone object file directory */
|
||||
#endif /* !defined TZDIR */
|
||||
|
||||
#ifndef TZDEFAULT
|
||||
#define TZDEFAULT "localtime"
|
||||
# define TZDEFAULT "/etc/localtime"
|
||||
#endif /* !defined TZDEFAULT */
|
||||
|
||||
#ifndef TZDEFRULES
|
||||
#define TZDEFRULES "posixrules"
|
||||
# define TZDEFRULES "posixrules"
|
||||
#endif /* !defined TZDEFRULES */
|
||||
|
||||
|
||||
/* See Internet RFC 8536 for more details about the following format. */
|
||||
|
||||
/*
|
||||
** Each file begins with. . .
|
||||
*/
|
||||
@ -49,9 +44,9 @@ static char tzfilehid[] = "@(#)tzfile.h 8.1";
|
||||
|
||||
struct tzhead {
|
||||
char tzh_magic[4]; /* TZ_MAGIC */
|
||||
char tzh_version[1]; /* '\0' or '2' as of 2005 */
|
||||
char tzh_reserved[15]; /* reserved--must be zero */
|
||||
char tzh_ttisgmtcnt[4]; /* coded number of trans. time flags */
|
||||
char tzh_version[1]; /* '\0' or '2'-'4' as of 2021 */
|
||||
char tzh_reserved[15]; /* reserved; must be zero */
|
||||
char tzh_ttisutcnt[4]; /* coded number of trans. time flags */
|
||||
char tzh_ttisstdcnt[4]; /* coded number of trans. time flags */
|
||||
char tzh_leapcnt[4]; /* coded number of leap seconds */
|
||||
char tzh_timecnt[4]; /* coded number of transition times */
|
||||
@ -65,23 +60,24 @@ struct tzhead {
|
||||
** tzh_timecnt (char [4])s coded transition times a la time(2)
|
||||
** tzh_timecnt (unsigned char)s types of local time starting at above
|
||||
** tzh_typecnt repetitions of
|
||||
** one (char [4]) coded UTC offset in seconds
|
||||
** one (char [4]) coded UT offset in seconds
|
||||
** one (unsigned char) used to set tm_isdst
|
||||
** one (unsigned char) that's an abbreviation list index
|
||||
** tzh_charcnt (char)s '\0'-terminated zone abbreviations
|
||||
** tzh_leapcnt repetitions of
|
||||
** one (char [4]) coded leap second transition times
|
||||
** one (char [4]) total correction after above
|
||||
** tzh_ttisstdcnt (char)s indexed by type; if TRUE, transition
|
||||
** time is standard time, if FALSE,
|
||||
** transition time is wall clock time
|
||||
** if absent, transition times are
|
||||
** assumed to be wall clock time
|
||||
** tzh_ttisgmtcnt (char)s indexed by type; if TRUE, transition
|
||||
** time is UTC, if FALSE,
|
||||
** transition time is local time
|
||||
** if absent, transition times are
|
||||
** tzh_ttisstdcnt (char)s indexed by type; if 1, transition
|
||||
** time is standard time, if 0,
|
||||
** transition time is local (wall clock)
|
||||
** time; if absent, transition times are
|
||||
** assumed to be local time
|
||||
** tzh_ttisutcnt (char)s indexed by type; if 1, transition
|
||||
** time is UT, if 0, transition time is
|
||||
** local time; if absent, transition
|
||||
** times are assumed to be local time.
|
||||
** When this is 1, the corresponding
|
||||
** std/wall indicator must also be 1.
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -92,6 +88,13 @@ struct tzhead {
|
||||
** instants after the last transition time stored in the file
|
||||
** (with nothing between the newlines if there is no POSIX representation for
|
||||
** such instants).
|
||||
**
|
||||
** If tz_version is '3' or greater, the above is extended as follows.
|
||||
** First, the POSIX TZ string's hour offset may range from -167
|
||||
** through 167 as compared to the POSIX-required 0 through 24.
|
||||
** Second, its DST start time may be January 1 at 00:00 and its stop
|
||||
** time December 31 at 24:00 plus the difference between DST and
|
||||
** standard time, indicating DST all year.
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -100,81 +103,21 @@ struct tzhead {
|
||||
*/
|
||||
|
||||
#ifndef TZ_MAX_TIMES
|
||||
#define TZ_MAX_TIMES 1200
|
||||
# define TZ_MAX_TIMES 2000
|
||||
#endif /* !defined TZ_MAX_TIMES */
|
||||
|
||||
#ifndef TZ_MAX_TYPES
|
||||
#ifndef NOSOLAR
|
||||
#define TZ_MAX_TYPES 256 /* Limited by what (unsigned char)'s can hold */
|
||||
#endif /* !defined NOSOLAR */
|
||||
#ifdef NOSOLAR
|
||||
/*
|
||||
** Must be at least 14 for Europe/Riga as of Jan 12 1995,
|
||||
** as noted by Earl Chew.
|
||||
*/
|
||||
#define TZ_MAX_TYPES 20 /* Maximum number of local time types */
|
||||
#endif /* !defined NOSOLAR */
|
||||
/* This must be at least 17 for Europe/Samara and Europe/Vilnius. */
|
||||
# define TZ_MAX_TYPES 256 /* Limited by what (unsigned char)'s can hold */
|
||||
#endif /* !defined TZ_MAX_TYPES */
|
||||
|
||||
#ifndef TZ_MAX_CHARS
|
||||
#define TZ_MAX_CHARS 50 /* Maximum number of abbreviation characters */
|
||||
# define TZ_MAX_CHARS 50 /* Maximum number of abbreviation characters */
|
||||
/* (limited by what unsigned chars can hold) */
|
||||
#endif /* !defined TZ_MAX_CHARS */
|
||||
|
||||
#ifndef TZ_MAX_LEAPS
|
||||
#define TZ_MAX_LEAPS 50 /* Maximum number of leap second corrections */
|
||||
# define TZ_MAX_LEAPS 50 /* Maximum number of leap second corrections */
|
||||
#endif /* !defined TZ_MAX_LEAPS */
|
||||
|
||||
#define SECSPERMIN 60
|
||||
#define MINSPERHOUR 60
|
||||
#define HOURSPERDAY 24
|
||||
#define DAYSPERWEEK 7
|
||||
#define DAYSPERNYEAR 365
|
||||
#define DAYSPERLYEAR 366
|
||||
#define SECSPERHOUR (SECSPERMIN * MINSPERHOUR)
|
||||
#define SECSPERDAY ((long) SECSPERHOUR * HOURSPERDAY)
|
||||
#define MONSPERYEAR 12
|
||||
|
||||
#define TM_SUNDAY 0
|
||||
#define TM_MONDAY 1
|
||||
#define TM_TUESDAY 2
|
||||
#define TM_WEDNESDAY 3
|
||||
#define TM_THURSDAY 4
|
||||
#define TM_FRIDAY 5
|
||||
#define TM_SATURDAY 6
|
||||
|
||||
#define TM_JANUARY 0
|
||||
#define TM_FEBRUARY 1
|
||||
#define TM_MARCH 2
|
||||
#define TM_APRIL 3
|
||||
#define TM_MAY 4
|
||||
#define TM_JUNE 5
|
||||
#define TM_JULY 6
|
||||
#define TM_AUGUST 7
|
||||
#define TM_SEPTEMBER 8
|
||||
#define TM_OCTOBER 9
|
||||
#define TM_NOVEMBER 10
|
||||
#define TM_DECEMBER 11
|
||||
|
||||
#define TM_YEAR_BASE 1900
|
||||
|
||||
#define EPOCH_YEAR 1970
|
||||
#define EPOCH_WDAY TM_THURSDAY
|
||||
|
||||
#define isleap(y) (((y) % 4) == 0 && (((y) % 100) != 0 || ((y) % 400) == 0))
|
||||
|
||||
/*
|
||||
** Since everything in isleap is modulo 400 (or a factor of 400), we know that
|
||||
** isleap(y) == isleap(y % 400)
|
||||
** and so
|
||||
** isleap(a + b) == isleap((a + b) % 400)
|
||||
** or
|
||||
** isleap(a + b) == isleap(a % 400 + b % 400)
|
||||
** This is true even if % means modulo rather than Fortran remainder
|
||||
** (which is allowed by C89 but not C99).
|
||||
** We use this to avoid addition overflow problems.
|
||||
*/
|
||||
|
||||
#define isleap_sum(a, b) isleap((a) % 400 + (b) % 400)
|
||||
|
||||
#endif /* !defined TZFILE_H */
|
||||
|
102
tzselect.8
102
tzselect.8
@ -1,43 +1,125 @@
|
||||
.TH TZSELECT 8
|
||||
.SH NAME
|
||||
tzselect \- select a time zone
|
||||
tzselect \- select a timezone
|
||||
.SH SYNOPSIS
|
||||
.ie \n(.g .ds - \f(CW-\fP
|
||||
.el .ds - \-
|
||||
.ds d " degrees
|
||||
.ds m " minutes
|
||||
.ds s " seconds
|
||||
.ds _ " \&
|
||||
.if t \{\
|
||||
. if \n(.g .if c \(de .if c \(fm .if c \(sd \{\
|
||||
. ds d \(de
|
||||
. ds m \(fm
|
||||
. ds s \(sd
|
||||
. ds _ \|
|
||||
. \}
|
||||
.\}
|
||||
.B tzselect
|
||||
[
|
||||
.B \*-c
|
||||
.I coord
|
||||
] [
|
||||
.B \*-n
|
||||
.I limit
|
||||
] [
|
||||
.B \*-\*-help
|
||||
] [
|
||||
.B \*-\*-version
|
||||
]
|
||||
.SH DESCRIPTION
|
||||
The
|
||||
.B tzselect
|
||||
program asks the user for information about the current location,
|
||||
and outputs the resulting time zone description to standard output.
|
||||
and outputs the resulting timezone to standard output.
|
||||
The output is suitable as a value for the TZ environment variable.
|
||||
.PP
|
||||
All interaction with the user is done via standard input and standard error.
|
||||
.SH OPTIONS
|
||||
.TP
|
||||
.BI "\*-c " coord
|
||||
Instead of asking for continent and then country and then city,
|
||||
ask for selection from time zones whose largest cities
|
||||
are closest to the location with geographical coordinates
|
||||
.I coord.
|
||||
Use ISO 6709 notation for
|
||||
.I coord,
|
||||
that is, a latitude immediately followed by a longitude. The latitude
|
||||
and longitude should be signed integers followed by an optional
|
||||
decimal point and fraction: positive numbers represent north and east,
|
||||
negative south and west. Latitudes with two and longitudes with three
|
||||
integer digits are treated as degrees; latitudes with four or six and
|
||||
longitudes with five or seven integer digits are treated as
|
||||
.I "DDMM, DDDMM, DDMMSS,"
|
||||
or
|
||||
.I DDDMMSS
|
||||
representing
|
||||
.I DD
|
||||
or
|
||||
.I DDD
|
||||
degrees,
|
||||
.I MM
|
||||
minutes,
|
||||
and zero or
|
||||
.I SS
|
||||
seconds, with any trailing fractions represent fractional minutes or
|
||||
(if
|
||||
.I SS
|
||||
is present) seconds. The decimal point is that of the current locale.
|
||||
For example, in the (default) C locale,
|
||||
.B "\*-c\ +40.689\*-074.045"
|
||||
specifies 40.689\*d\*_N, 74.045\*d\*_W,
|
||||
.B "\*-c\ +4041.4\*-07402.7"
|
||||
specifies 40\*d\*_41.4\*m\*_N, 74\*d\*_2.7\*m\*_W, and
|
||||
.B "\*-c\ +404121\*-0740240"
|
||||
specifies 40\*d\*_41\*m\*_21\*s\*_N, 74\*d\*_2\*m\*_40\*s\*_W.
|
||||
If
|
||||
.I coord
|
||||
is not one of the documented forms, the resulting behavior is unspecified.
|
||||
.TP
|
||||
.BI "\*-n " limit
|
||||
When
|
||||
.B \*-c
|
||||
is used, display the closest
|
||||
.I limit
|
||||
locations (default 10).
|
||||
.TP
|
||||
.B "\*-\*-help"
|
||||
Output help information and exit.
|
||||
.TP
|
||||
.B "\*-\*-version"
|
||||
Output version information and exit.
|
||||
.SH "ENVIRONMENT VARIABLES"
|
||||
.TP
|
||||
\f3AWK\fP
|
||||
Name of a Posix-compliant
|
||||
.I awk
|
||||
.B awk
|
||||
program (default:
|
||||
.BR awk ).
|
||||
.TP
|
||||
\f3TZDIR\fP
|
||||
Name of the directory containing time zone data files (default:
|
||||
.BR /usr/local/etc/zoneinfo ).
|
||||
Name of the directory containing timezone data files (default:
|
||||
.BR /usr/share/zoneinfo ).
|
||||
.SH FILES
|
||||
.TP
|
||||
\f2TZDIR\fP\f3/iso3166.tab\fP
|
||||
Table of ISO 3166 2-letter country codes and country names.
|
||||
.TP
|
||||
\f2TZDIR\fP\f3/zone.tab\fP
|
||||
Table of country codes, latitude and longitude, TZ values, and
|
||||
\f2TZDIR\fP\f3/zone1970.tab\fP
|
||||
Table of country codes, latitude and longitude, timezones, and
|
||||
descriptive comments.
|
||||
.TP
|
||||
\f2TZDIR\fP\f3/\fP\f2TZ\fP
|
||||
Time zone data file for time zone \f2TZ\fP.
|
||||
Timezone data file for timezone \f2TZ\fP.
|
||||
.SH "EXIT STATUS"
|
||||
The exit status is zero if a time zone was successfully obtained from the user,
|
||||
The exit status is zero if a timezone was successfully obtained from the user,
|
||||
nonzero otherwise.
|
||||
.SH "SEE ALSO"
|
||||
newctime(3), tzfile(5), zdump(8), zic(8)
|
||||
.\" @(#)tzselect.8 8.2
|
||||
.SH NOTES
|
||||
Applications should not assume that
|
||||
.BR tzselect 's
|
||||
output matches the user's political preferences.
|
||||
.\" This file is in the public domain, so clarified as of
|
||||
.\" 2009-05-17 by Arthur David Olson.
|
||||
|
@ -1,41 +1,77 @@
|
||||
NAME
|
||||
TZSELECT(8) System Manager's Manual TZSELECT(8)
|
||||
|
||||
tzselect - select a time zone
|
||||
NAME
|
||||
tzselect - select a timezone
|
||||
|
||||
SYNOPSIS
|
||||
tzselect
|
||||
tzselect [ -c coord ] [ -n limit ] [ --help ] [ --version ]
|
||||
|
||||
DESCRIPTION
|
||||
The tzselect program asks the user for information about the
|
||||
current location, and outputs the resulting time zone
|
||||
description to standard output. The output is suitable as a
|
||||
value for the TZ environment variable.
|
||||
The tzselect program asks the user for information about the current
|
||||
location, and outputs the resulting timezone to standard output. The
|
||||
output is suitable as a value for the TZ environment variable.
|
||||
|
||||
All interaction with the user is done via standard input and
|
||||
standard error.
|
||||
All interaction with the user is done via standard input and standard
|
||||
error.
|
||||
|
||||
OPTIONS
|
||||
-c coord
|
||||
Instead of asking for continent and then country and then city,
|
||||
ask for selection from time zones whose largest cities are
|
||||
closest to the location with geographical coordinates coord.
|
||||
Use ISO 6709 notation for coord, that is, a latitude immediately
|
||||
followed by a longitude. The latitude and longitude should be
|
||||
signed integers followed by an optional decimal point and
|
||||
fraction: positive numbers represent north and east, negative
|
||||
south and west. Latitudes with two and longitudes with three
|
||||
integer digits are treated as degrees; latitudes with four or
|
||||
six and longitudes with five or seven integer digits are treated
|
||||
as DDMM, DDDMM, DDMMSS, or DDDMMSS representing DD or DDD
|
||||
degrees, MM minutes, and zero or SS seconds, with any trailing
|
||||
fractions represent fractional minutes or (if SS is present)
|
||||
seconds. The decimal point is that of the current locale. For
|
||||
example, in the (default) C locale, -c +40.689-074.045 specifies
|
||||
40.689 degrees N, 74.045 degrees W, -c +4041.4-07402.7 specifies
|
||||
40 degrees 41.4 minutes N, 74 degrees 2.7 minutes W, and
|
||||
-c +404121-0740240 specifies 40 degrees 41 minutes 21 seconds N,
|
||||
74 degrees 2 minutes 40 seconds W. If coord is not one of the
|
||||
documented forms, the resulting behavior is unspecified.
|
||||
|
||||
-n limit
|
||||
When -c is used, display the closest limit locations (default
|
||||
10).
|
||||
|
||||
--help Output help information and exit.
|
||||
|
||||
--version
|
||||
Output version information and exit.
|
||||
|
||||
ENVIRONMENT VARIABLES
|
||||
AWK Name of a Posix-compliant awk program (default: awk).
|
||||
AWK Name of a Posix-compliant awk program (default: awk).
|
||||
|
||||
TZDIR
|
||||
Name of the directory containing time zone data files
|
||||
(default: /usr/local/etc/zoneinfo).
|
||||
TZDIR Name of the directory containing timezone data files (default:
|
||||
/usr/share/zoneinfo).
|
||||
|
||||
FILES
|
||||
TZDIR/iso3166.tab
|
||||
Table of ISO 3166 2-letter country codes and country
|
||||
names.
|
||||
TZDIR/iso3166.tab
|
||||
Table of ISO 3166 2-letter country codes and country names.
|
||||
|
||||
TZDIR/zone.tab
|
||||
Table of country codes, latitude and longitude, TZ
|
||||
values, and descriptive comments.
|
||||
TZDIR/zone1970.tab
|
||||
Table of country codes, latitude and longitude, timezones, and
|
||||
descriptive comments.
|
||||
|
||||
TZDIR/TZ
|
||||
Time zone data file for time zone TZ.
|
||||
TZDIR/TZ
|
||||
Timezone data file for timezone TZ.
|
||||
|
||||
EXIT STATUS
|
||||
The exit status is zero if a time zone was successfully
|
||||
obtained from the user, nonzero otherwise.
|
||||
The exit status is zero if a timezone was successfully obtained from
|
||||
the user, nonzero otherwise.
|
||||
|
||||
SEE ALSO
|
||||
newctime(3), tzfile(5), zdump(8), zic(8)
|
||||
newctime(3), tzfile(5), zdump(8), zic(8)
|
||||
|
||||
NOTES
|
||||
Applications should not assume that tzselect's output matches the
|
||||
user's political preferences.
|
||||
|
||||
TZSELECT(8)
|
||||
|
544
tzselect.ksh
544
tzselect.ksh
@ -1,86 +1,286 @@
|
||||
#! /bin/ksh
|
||||
|
||||
VERSION='@(#)tzselect.ksh 8.2'
|
||||
|
||||
#!/bin/bash
|
||||
# Ask the user about the time zone, and output the resulting TZ value to stdout.
|
||||
# Interact with the user via stderr and stdin.
|
||||
|
||||
# Contributed by Paul Eggert.
|
||||
PKGVERSION='(tzcode) '
|
||||
TZVERSION=see_Makefile
|
||||
REPORT_BUGS_TO=tz@iana.org
|
||||
|
||||
# Contributed by Paul Eggert. This file is in the public domain.
|
||||
|
||||
# Porting notes:
|
||||
#
|
||||
# This script requires several features of the Korn shell.
|
||||
# If your host lacks the Korn shell,
|
||||
# you can use either of the following free programs instead:
|
||||
# This script requires a Posix-like shell and prefers the extension of a
|
||||
# 'select' statement. The 'select' statement was introduced in the
|
||||
# Korn shell and is available in Bash and other shell implementations.
|
||||
# If your host lacks both Bash and the Korn shell, you can get their
|
||||
# source from one of these locations:
|
||||
#
|
||||
# <a href=ftp://ftp.gnu.org/pub/gnu/>
|
||||
# Bourne-Again shell (bash)
|
||||
# </a>
|
||||
# Bash <https://www.gnu.org/software/bash/>
|
||||
# Korn Shell <http://www.kornshell.com/>
|
||||
# MirBSD Korn Shell <http://www.mirbsd.org/mksh.htm>
|
||||
#
|
||||
# <a href=ftp://ftp.cs.mun.ca/pub/pdksh/pdksh.tar.gz>
|
||||
# Public domain ksh
|
||||
# </a>
|
||||
# For portability to Solaris 10 /bin/sh (supported by Oracle through
|
||||
# January 2024) this script avoids some POSIX features and common
|
||||
# extensions, such as $(...) (which works sometimes but not others),
|
||||
# $((...)), ! CMD, ${#ID}, ${ID##PAT}, ${ID%%PAT}, and $10.
|
||||
|
||||
#
|
||||
# This script also uses several features of modern awk programs.
|
||||
# If your host lacks awk, or has an old awk that does not conform to Posix.2,
|
||||
# If your host lacks awk, or has an old awk that does not conform to Posix,
|
||||
# you can use either of the following free programs instead:
|
||||
#
|
||||
# <a href=ftp://ftp.gnu.org/pub/gnu/>
|
||||
# GNU awk (gawk)
|
||||
# </a>
|
||||
#
|
||||
# <a href=ftp://ftp.whidbey.net/pub/brennan/>
|
||||
# mawk
|
||||
# </a>
|
||||
# Gawk (GNU awk) <https://www.gnu.org/software/gawk/>
|
||||
# mawk <https://invisible-island.net/mawk/>
|
||||
|
||||
|
||||
# Specify default values for environment variables if they are unset.
|
||||
: ${AWK=awk}
|
||||
: ${TZDIR=$(pwd)}
|
||||
: ${TZDIR=`pwd`}
|
||||
|
||||
# Output one argument as-is to standard output.
|
||||
# Safer than 'echo', which can mishandle '\' or leading '-'.
|
||||
say() {
|
||||
printf '%s\n' "$1"
|
||||
}
|
||||
|
||||
# Check for awk Posix compliance.
|
||||
($AWK -v x=y 'BEGIN { exit 123 }') </dev/null >/dev/null 2>&1
|
||||
[ $? = 123 ] || {
|
||||
echo >&2 "$0: Sorry, your \`$AWK' program is not Posix compatible."
|
||||
say >&2 "$0: Sorry, your '$AWK' program is not Posix compatible."
|
||||
exit 1
|
||||
}
|
||||
|
||||
if [ "$1" = "--help" ]; then
|
||||
cat <<EOF
|
||||
Usage: tzselect
|
||||
Select a time zone interactively.
|
||||
coord=
|
||||
location_limit=10
|
||||
zonetabtype=zone1970
|
||||
|
||||
Report bugs to tz@elsie.nci.nih.gov.
|
||||
EOF
|
||||
exit 0
|
||||
elif [ "$1" = "--version" ]; then
|
||||
cat <<EOF
|
||||
tzselect $VERSION
|
||||
EOF
|
||||
exit 0
|
||||
usage="Usage: tzselect [--version] [--help] [-c COORD] [-n LIMIT]
|
||||
Select a timezone interactively.
|
||||
|
||||
Options:
|
||||
|
||||
-c COORD
|
||||
Instead of asking for continent and then country and then city,
|
||||
ask for selection from time zones whose largest cities
|
||||
are closest to the location with geographical coordinates COORD.
|
||||
COORD should use ISO 6709 notation, for example, '-c +4852+00220'
|
||||
for Paris (in degrees and minutes, North and East), or
|
||||
'-c -35-058' for Buenos Aires (in degrees, South and West).
|
||||
|
||||
-n LIMIT
|
||||
Display at most LIMIT locations when -c is used (default $location_limit).
|
||||
|
||||
--version
|
||||
Output version information.
|
||||
|
||||
--help
|
||||
Output this help.
|
||||
|
||||
Report bugs to $REPORT_BUGS_TO."
|
||||
|
||||
# Ask the user to select from the function's arguments,
|
||||
# and assign the selected argument to the variable 'select_result'.
|
||||
# Exit on EOF or I/O error. Use the shell's 'select' builtin if available,
|
||||
# falling back on a less-nice but portable substitute otherwise.
|
||||
if
|
||||
case $BASH_VERSION in
|
||||
?*) : ;;
|
||||
'')
|
||||
# '; exit' should be redundant, but Dash doesn't properly fail without it.
|
||||
(eval 'set --; select x; do break; done; exit') </dev/null 2>/dev/null
|
||||
esac
|
||||
then
|
||||
# Do this inside 'eval', as otherwise the shell might exit when parsing it
|
||||
# even though it is never executed.
|
||||
eval '
|
||||
doselect() {
|
||||
select select_result
|
||||
do
|
||||
case $select_result in
|
||||
"") echo >&2 "Please enter a number in range." ;;
|
||||
?*) break
|
||||
esac
|
||||
done || exit
|
||||
}
|
||||
'
|
||||
else
|
||||
doselect() {
|
||||
# Field width of the prompt numbers.
|
||||
select_width=`expr $# : '.*'`
|
||||
|
||||
select_i=
|
||||
|
||||
while :
|
||||
do
|
||||
case $select_i in
|
||||
'')
|
||||
select_i=0
|
||||
for select_word
|
||||
do
|
||||
select_i=`expr $select_i + 1`
|
||||
printf >&2 "%${select_width}d) %s\\n" $select_i "$select_word"
|
||||
done ;;
|
||||
*[!0-9]*)
|
||||
echo >&2 'Please enter a number in range.' ;;
|
||||
*)
|
||||
if test 1 -le $select_i && test $select_i -le $#; then
|
||||
shift `expr $select_i - 1`
|
||||
select_result=$1
|
||||
break
|
||||
fi
|
||||
echo >&2 'Please enter a number in range.'
|
||||
esac
|
||||
|
||||
# Prompt and read input.
|
||||
printf >&2 %s "${PS3-#? }"
|
||||
read select_i || exit
|
||||
done
|
||||
}
|
||||
fi
|
||||
|
||||
while getopts c:n:t:-: opt
|
||||
do
|
||||
case $opt$OPTARG in
|
||||
c*)
|
||||
coord=$OPTARG ;;
|
||||
n*)
|
||||
location_limit=$OPTARG ;;
|
||||
t*) # Undocumented option, used for developer testing.
|
||||
zonetabtype=$OPTARG ;;
|
||||
-help)
|
||||
exec echo "$usage" ;;
|
||||
-version)
|
||||
exec echo "tzselect $PKGVERSION$TZVERSION" ;;
|
||||
-*)
|
||||
say >&2 "$0: -$opt$OPTARG: unknown option; try '$0 --help'"; exit 1 ;;
|
||||
*)
|
||||
say >&2 "$0: try '$0 --help'"; exit 1 ;;
|
||||
esac
|
||||
done
|
||||
|
||||
shift `expr $OPTIND - 1`
|
||||
case $# in
|
||||
0) ;;
|
||||
*) say >&2 "$0: $1: unknown argument"; exit 1 ;;
|
||||
esac
|
||||
|
||||
# Make sure the tables are readable.
|
||||
TZ_COUNTRY_TABLE=$TZDIR/iso3166.tab
|
||||
TZ_ZONE_TABLE=$TZDIR/zone.tab
|
||||
TZ_ZONE_TABLE=$TZDIR/$zonetabtype.tab
|
||||
for f in $TZ_COUNTRY_TABLE $TZ_ZONE_TABLE
|
||||
do
|
||||
<$f || {
|
||||
echo >&2 "$0: time zone files are not set up correctly"
|
||||
<"$f" || {
|
||||
say >&2 "$0: time zone files are not set up correctly"
|
||||
exit 1
|
||||
}
|
||||
done
|
||||
|
||||
# If the current locale does not support UTF-8, convert data to current
|
||||
# locale's format if possible, as the shell aligns columns better that way.
|
||||
# Check the UTF-8 of U+12345 CUNEIFORM SIGN URU TIMES KI.
|
||||
$AWK 'BEGIN { u12345 = "\360\222\215\205"; exit length(u12345) != 1 }' || {
|
||||
{ tmp=`(mktemp -d) 2>/dev/null` || {
|
||||
tmp=${TMPDIR-/tmp}/tzselect.$$ &&
|
||||
(umask 77 && mkdir -- "$tmp")
|
||||
};} &&
|
||||
trap 'status=$?; rm -fr -- "$tmp"; exit $status' 0 HUP INT PIPE TERM &&
|
||||
(iconv -f UTF-8 -t //TRANSLIT <"$TZ_COUNTRY_TABLE" >$tmp/iso3166.tab) \
|
||||
2>/dev/null &&
|
||||
TZ_COUNTRY_TABLE=$tmp/iso3166.tab &&
|
||||
iconv -f UTF-8 -t //TRANSLIT <"$TZ_ZONE_TABLE" >$tmp/$zonetabtype.tab &&
|
||||
TZ_ZONE_TABLE=$tmp/$zonetabtype.tab
|
||||
}
|
||||
|
||||
newline='
|
||||
'
|
||||
IFS=$newline
|
||||
|
||||
|
||||
# Work around a bug in bash 1.14.7 and earlier, where $PS3 is sent to stdout.
|
||||
case $(echo 1 | (select x in x; do break; done) 2>/dev/null) in
|
||||
?*) PS3=
|
||||
esac
|
||||
|
||||
# Awk script to read a time zone table and output the same table,
|
||||
# with each column preceded by its distance from 'here'.
|
||||
output_distances='
|
||||
BEGIN {
|
||||
FS = "\t"
|
||||
while (getline <TZ_COUNTRY_TABLE)
|
||||
if ($0 ~ /^[^#]/)
|
||||
country[$1] = $2
|
||||
country["US"] = "US" # Otherwise the strings get too long.
|
||||
}
|
||||
function abs(x) {
|
||||
return x < 0 ? -x : x;
|
||||
}
|
||||
function min(x, y) {
|
||||
return x < y ? x : y;
|
||||
}
|
||||
function convert_coord(coord, deg, minute, ilen, sign, sec) {
|
||||
if (coord ~ /^[-+]?[0-9]?[0-9][0-9][0-9][0-9][0-9][0-9]([^0-9]|$)/) {
|
||||
degminsec = coord
|
||||
intdeg = degminsec < 0 ? -int(-degminsec / 10000) : int(degminsec / 10000)
|
||||
minsec = degminsec - intdeg * 10000
|
||||
intmin = minsec < 0 ? -int(-minsec / 100) : int(minsec / 100)
|
||||
sec = minsec - intmin * 100
|
||||
deg = (intdeg * 3600 + intmin * 60 + sec) / 3600
|
||||
} else if (coord ~ /^[-+]?[0-9]?[0-9][0-9][0-9][0-9]([^0-9]|$)/) {
|
||||
degmin = coord
|
||||
intdeg = degmin < 0 ? -int(-degmin / 100) : int(degmin / 100)
|
||||
minute = degmin - intdeg * 100
|
||||
deg = (intdeg * 60 + minute) / 60
|
||||
} else
|
||||
deg = coord
|
||||
return deg * 0.017453292519943296
|
||||
}
|
||||
function convert_latitude(coord) {
|
||||
match(coord, /..*[-+]/)
|
||||
return convert_coord(substr(coord, 1, RLENGTH - 1))
|
||||
}
|
||||
function convert_longitude(coord) {
|
||||
match(coord, /..*[-+]/)
|
||||
return convert_coord(substr(coord, RLENGTH))
|
||||
}
|
||||
# Great-circle distance between points with given latitude and longitude.
|
||||
# Inputs and output are in radians. This uses the great-circle special
|
||||
# case of the Vicenty formula for distances on ellipsoids.
|
||||
function gcdist(lat1, long1, lat2, long2, dlong, x, y, num, denom) {
|
||||
dlong = long2 - long1
|
||||
x = cos(lat2) * sin(dlong)
|
||||
y = cos(lat1) * sin(lat2) - sin(lat1) * cos(lat2) * cos(dlong)
|
||||
num = sqrt(x * x + y * y)
|
||||
denom = sin(lat1) * sin(lat2) + cos(lat1) * cos(lat2) * cos(dlong)
|
||||
return atan2(num, denom)
|
||||
}
|
||||
# Parallel distance between points with given latitude and longitude.
|
||||
# This is the product of the longitude difference and the cosine
|
||||
# of the latitude of the point that is further from the equator.
|
||||
# I.e., it considers longitudes to be further apart if they are
|
||||
# nearer the equator.
|
||||
function pardist(lat1, long1, lat2, long2) {
|
||||
return abs(long1 - long2) * min(cos(lat1), cos(lat2))
|
||||
}
|
||||
# The distance function is the sum of the great-circle distance and
|
||||
# the parallel distance. It could be weighted.
|
||||
function dist(lat1, long1, lat2, long2) {
|
||||
return gcdist(lat1, long1, lat2, long2) + pardist(lat1, long1, lat2, long2)
|
||||
}
|
||||
BEGIN {
|
||||
coord_lat = convert_latitude(coord)
|
||||
coord_long = convert_longitude(coord)
|
||||
}
|
||||
/^[^#]/ {
|
||||
here_lat = convert_latitude($2)
|
||||
here_long = convert_longitude($2)
|
||||
line = $1 "\t" $2 "\t" $3
|
||||
sep = "\t"
|
||||
ncc = split($1, cc, /,/)
|
||||
for (i = 1; i <= ncc; i++) {
|
||||
line = line sep country[cc[i]]
|
||||
sep = ", "
|
||||
}
|
||||
if (NF == 4)
|
||||
line = line " - " $4
|
||||
printf "%g\t%s\n", dist(coord_lat, coord_long, here_lat, here_long), line
|
||||
}
|
||||
'
|
||||
|
||||
# Begin the main loop. We come back here if the user wants to retry.
|
||||
while
|
||||
@ -92,71 +292,149 @@ while
|
||||
country=
|
||||
region=
|
||||
|
||||
case $coord in
|
||||
?*)
|
||||
continent=coord;;
|
||||
'')
|
||||
|
||||
# Ask the user for continent or ocean.
|
||||
|
||||
echo >&2 'Please select a continent or ocean.'
|
||||
echo >&2 'Please select a continent, ocean, "coord", or "TZ".'
|
||||
|
||||
select continent in \
|
||||
Africa \
|
||||
Americas \
|
||||
Antarctica \
|
||||
'Arctic Ocean' \
|
||||
Asia \
|
||||
'Atlantic Ocean' \
|
||||
Australia \
|
||||
Europe \
|
||||
'Indian Ocean' \
|
||||
'Pacific Ocean' \
|
||||
'none - I want to specify the time zone using the Posix TZ format.'
|
||||
do
|
||||
quoted_continents=`
|
||||
$AWK '
|
||||
function handle_entry(entry) {
|
||||
entry = substr(entry, 1, index(entry, "/") - 1)
|
||||
if (entry == "America")
|
||||
entry = entry "s"
|
||||
if (entry ~ /^(Arctic|Atlantic|Indian|Pacific)$/)
|
||||
entry = entry " Ocean"
|
||||
printf "'\''%s'\''\n", entry
|
||||
}
|
||||
BEGIN { FS = "\t" }
|
||||
/^[^#]/ {
|
||||
handle_entry($3)
|
||||
}
|
||||
/^#@/ {
|
||||
ncont = split($2, cont, /,/)
|
||||
for (ci = 1; ci <= ncont; ci++) {
|
||||
handle_entry(cont[ci])
|
||||
}
|
||||
}
|
||||
' <"$TZ_ZONE_TABLE" |
|
||||
sort -u |
|
||||
tr '\n' ' '
|
||||
echo ''
|
||||
`
|
||||
|
||||
eval '
|
||||
doselect '"$quoted_continents"' \
|
||||
"coord - I want to use geographical coordinates." \
|
||||
"TZ - I want to specify the timezone using the Posix TZ format."
|
||||
continent=$select_result
|
||||
case $continent in
|
||||
'')
|
||||
echo >&2 'Please enter a number in range.';;
|
||||
?*)
|
||||
case $continent in
|
||||
Americas) continent=America;;
|
||||
*' '*) continent=$(expr "$continent" : '\([^ ]*\)')
|
||||
esac
|
||||
break
|
||||
Americas) continent=America;;
|
||||
*" "*) continent=`expr "$continent" : '\''\([^ ]*\)'\''`
|
||||
esac
|
||||
done
|
||||
'
|
||||
esac
|
||||
|
||||
case $continent in
|
||||
'')
|
||||
exit 1;;
|
||||
none)
|
||||
TZ)
|
||||
# Ask the user for a Posix TZ string. Check that it conforms.
|
||||
while
|
||||
echo >&2 'Please enter the desired value' \
|
||||
'of the TZ environment variable.'
|
||||
echo >&2 'For example, GST-10 is a zone named GST' \
|
||||
'that is 10 hours ahead (east) of UTC.'
|
||||
echo >&2 'For example, AEST-10 is abbreviated' \
|
||||
'AEST and is 10 hours'
|
||||
echo >&2 'ahead (east) of Greenwich,' \
|
||||
'with no daylight saving time.'
|
||||
read TZ
|
||||
$AWK -v TZ="$TZ" 'BEGIN {
|
||||
tzname = "[^-+,0-9][^-+,0-9][^-+,0-9]+"
|
||||
time = "[0-2]?[0-9](:[0-5][0-9](:[0-5][0-9])?)?"
|
||||
tzname = "(<[[:alnum:]+-]{3,}>|[[:alpha:]]{3,})"
|
||||
time = "(2[0-4]|[0-1]?[0-9])" \
|
||||
"(:[0-5][0-9](:[0-5][0-9])?)?"
|
||||
offset = "[-+]?" time
|
||||
date = "(J?[0-9]+|M[0-9]+\.[0-9]+\.[0-9]+)"
|
||||
datetime = "," date "(/" time ")?"
|
||||
mdate = "M([1-9]|1[0-2])\\.[1-5]\\.[0-6]"
|
||||
jdate = "((J[1-9]|[0-9]|J?[1-9][0-9]" \
|
||||
"|J?[1-2][0-9][0-9])|J?3[0-5][0-9]|J?36[0-5])"
|
||||
datetime = ",(" mdate "|" jdate ")(/" time ")?"
|
||||
tzpattern = "^(:.*|" tzname offset "(" tzname \
|
||||
"(" offset ")?(" datetime datetime ")?)?)$"
|
||||
if (TZ ~ tzpattern) exit 1
|
||||
exit 0
|
||||
}'
|
||||
do
|
||||
echo >&2 "\`$TZ' is not a conforming" \
|
||||
'Posix time zone string.'
|
||||
say >&2 "'$TZ' is not a conforming Posix timezone string."
|
||||
done
|
||||
TZ_for_date=$TZ;;
|
||||
*)
|
||||
case $continent in
|
||||
coord)
|
||||
case $coord in
|
||||
'')
|
||||
echo >&2 'Please enter coordinates' \
|
||||
'in ISO 6709 notation.'
|
||||
echo >&2 'For example, +4042-07403 stands for'
|
||||
echo >&2 '40 degrees 42 minutes north,' \
|
||||
'74 degrees 3 minutes west.'
|
||||
read coord;;
|
||||
esac
|
||||
distance_table=`$AWK \
|
||||
-v coord="$coord" \
|
||||
-v TZ_COUNTRY_TABLE="$TZ_COUNTRY_TABLE" \
|
||||
"$output_distances" <"$TZ_ZONE_TABLE" |
|
||||
sort -n |
|
||||
sed "${location_limit}q"
|
||||
`
|
||||
regions=`say "$distance_table" | $AWK '
|
||||
BEGIN { FS = "\t" }
|
||||
{ print $NF }
|
||||
'`
|
||||
echo >&2 'Please select one of the following timezones,' \
|
||||
echo >&2 'listed roughly in increasing order' \
|
||||
"of distance from $coord".
|
||||
doselect $regions
|
||||
region=$select_result
|
||||
TZ=`say "$distance_table" | $AWK -v region="$region" '
|
||||
BEGIN { FS="\t" }
|
||||
$NF == region { print $4 }
|
||||
'`
|
||||
;;
|
||||
*)
|
||||
# Get list of names of countries in the continent or ocean.
|
||||
countries=$($AWK -F'\t' \
|
||||
-v continent="$continent" \
|
||||
countries=`$AWK \
|
||||
-v continent_re="^$continent/" \
|
||||
-v TZ_COUNTRY_TABLE="$TZ_COUNTRY_TABLE" \
|
||||
'
|
||||
/^#/ { next }
|
||||
$3 ~ ("^" continent "/") {
|
||||
if (!cc_seen[$1]++) cc_list[++ccs] = $1
|
||||
BEGIN { FS = "\t" }
|
||||
/^#$/ { next }
|
||||
/^#[^@]/ { next }
|
||||
{
|
||||
commentary = $0 ~ /^#@/
|
||||
if (commentary) {
|
||||
col1ccs = substr($1, 3)
|
||||
conts = $2
|
||||
} else {
|
||||
col1ccs = $1
|
||||
conts = $3
|
||||
}
|
||||
ncc = split(col1ccs, cc, /,/)
|
||||
ncont = split(conts, cont, /,/)
|
||||
for (i = 1; i <= ncc; i++) {
|
||||
elsewhere = commentary
|
||||
for (ci = 1; ci <= ncont; ci++) {
|
||||
if (cont[ci] ~ continent_re) {
|
||||
if (!cc_seen[cc[i]]++) cc_list[++ccs] = cc[i]
|
||||
elsewhere = 0
|
||||
}
|
||||
}
|
||||
if (elsewhere) {
|
||||
for (i = 1; i <= ncc; i++) {
|
||||
cc_elsewhere[cc[i]] = 1
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
END {
|
||||
while (getline <TZ_COUNTRY_TABLE) {
|
||||
@ -164,41 +442,35 @@ while
|
||||
}
|
||||
for (i = 1; i <= ccs; i++) {
|
||||
country = cc_list[i]
|
||||
if (cc_elsewhere[country]) continue
|
||||
if (cc_name[country]) {
|
||||
country = cc_name[country]
|
||||
}
|
||||
print country
|
||||
}
|
||||
}
|
||||
' <$TZ_ZONE_TABLE | sort -f)
|
||||
' <"$TZ_ZONE_TABLE" | sort -f`
|
||||
|
||||
|
||||
# If there's more than one country, ask the user which one.
|
||||
case $countries in
|
||||
*"$newline"*)
|
||||
echo >&2 'Please select a country.'
|
||||
select country in $countries
|
||||
do
|
||||
case $country in
|
||||
'') echo >&2 'Please enter a number in range.';;
|
||||
?*) break
|
||||
esac
|
||||
done
|
||||
|
||||
case $country in
|
||||
'') exit 1
|
||||
esac;;
|
||||
echo >&2 'Please select a country' \
|
||||
'whose clocks agree with yours.'
|
||||
doselect $countries
|
||||
country=$select_result;;
|
||||
*)
|
||||
country=$countries
|
||||
esac
|
||||
|
||||
|
||||
# Get list of names of time zone rule regions in the country.
|
||||
regions=$($AWK -F'\t' \
|
||||
# Get list of timezones in the country.
|
||||
regions=`$AWK \
|
||||
-v country="$country" \
|
||||
-v TZ_COUNTRY_TABLE="$TZ_COUNTRY_TABLE" \
|
||||
'
|
||||
BEGIN {
|
||||
FS = "\t"
|
||||
cc = country
|
||||
while (getline <TZ_COUNTRY_TABLE) {
|
||||
if ($0 !~ /^#/ && country == $2) {
|
||||
@ -207,36 +479,29 @@ while
|
||||
}
|
||||
}
|
||||
}
|
||||
$1 == cc { print $4 }
|
||||
' <$TZ_ZONE_TABLE)
|
||||
/^#/ { next }
|
||||
$1 ~ cc { print $4 }
|
||||
' <"$TZ_ZONE_TABLE"`
|
||||
|
||||
|
||||
# If there's more than one region, ask the user which one.
|
||||
case $regions in
|
||||
*"$newline"*)
|
||||
echo >&2 'Please select one of the following' \
|
||||
'time zone regions.'
|
||||
select region in $regions
|
||||
do
|
||||
case $region in
|
||||
'') echo >&2 'Please enter a number in range.';;
|
||||
?*) break
|
||||
esac
|
||||
done
|
||||
case $region in
|
||||
'') exit 1
|
||||
esac;;
|
||||
echo >&2 'Please select one of the following timezones.'
|
||||
doselect $regions
|
||||
region=$select_result;;
|
||||
*)
|
||||
region=$regions
|
||||
esac
|
||||
|
||||
# Determine TZ from country and region.
|
||||
TZ=$($AWK -F'\t' \
|
||||
TZ=`$AWK \
|
||||
-v country="$country" \
|
||||
-v region="$region" \
|
||||
-v TZ_COUNTRY_TABLE="$TZ_COUNTRY_TABLE" \
|
||||
'
|
||||
BEGIN {
|
||||
FS = "\t"
|
||||
cc = country
|
||||
while (getline <TZ_COUNTRY_TABLE) {
|
||||
if ($0 !~ /^#/ && country == $2) {
|
||||
@ -245,13 +510,15 @@ while
|
||||
}
|
||||
}
|
||||
}
|
||||
$1 == cc && $4 == region { print $3 }
|
||||
' <$TZ_ZONE_TABLE)
|
||||
/^#/ { next }
|
||||
$1 ~ cc && $4 == region { print $3 }
|
||||
' <"$TZ_ZONE_TABLE"`
|
||||
esac
|
||||
|
||||
# Make sure the corresponding zoneinfo file exists.
|
||||
TZ_for_date=$TZDIR/$TZ
|
||||
<$TZ_for_date || {
|
||||
echo >&2 "$0: time zone files are not set up correctly"
|
||||
<"$TZ_for_date" || {
|
||||
say >&2 "$0: time zone files are not set up correctly"
|
||||
exit 1
|
||||
}
|
||||
esac
|
||||
@ -264,14 +531,14 @@ while
|
||||
extra_info=
|
||||
for i in 1 2 3 4 5 6 7 8
|
||||
do
|
||||
TZdate=$(LANG=C TZ="$TZ_for_date" date)
|
||||
UTdate=$(LANG=C TZ=UTC0 date)
|
||||
TZsec=$(expr "$TZdate" : '.*:\([0-5][0-9]\)')
|
||||
UTsec=$(expr "$UTdate" : '.*:\([0-5][0-9]\)')
|
||||
TZdate=`LANG=C TZ="$TZ_for_date" date`
|
||||
UTdate=`LANG=C TZ=UTC0 date`
|
||||
TZsec=`expr "$TZdate" : '.*:\([0-5][0-9]\)'`
|
||||
UTsec=`expr "$UTdate" : '.*:\([0-5][0-9]\)'`
|
||||
case $TZsec in
|
||||
$UTsec)
|
||||
extra_info="
|
||||
Local time is now: $TZdate.
|
||||
Selected time is now: $TZdate.
|
||||
Universal Time is now: $UTdate."
|
||||
break
|
||||
esac
|
||||
@ -283,28 +550,23 @@ Universal Time is now: $UTdate."
|
||||
echo >&2 ""
|
||||
echo >&2 "The following information has been given:"
|
||||
echo >&2 ""
|
||||
case $country+$region in
|
||||
?*+?*) echo >&2 " $country$newline $region";;
|
||||
?*+) echo >&2 " $country";;
|
||||
+) echo >&2 " TZ='$TZ'"
|
||||
case $country%$region%$coord in
|
||||
?*%?*%) say >&2 " $country$newline $region";;
|
||||
?*%%) say >&2 " $country";;
|
||||
%?*%?*) say >&2 " coord $coord$newline $region";;
|
||||
%%?*) say >&2 " coord $coord";;
|
||||
*) say >&2 " TZ='$TZ'"
|
||||
esac
|
||||
echo >&2 ""
|
||||
echo >&2 "Therefore TZ='$TZ' will be used.$extra_info"
|
||||
echo >&2 "Is the above information OK?"
|
||||
say >&2 ""
|
||||
say >&2 "Therefore TZ='$TZ' will be used.$extra_info"
|
||||
say >&2 "Is the above information OK?"
|
||||
|
||||
ok=
|
||||
select ok in Yes No
|
||||
do
|
||||
case $ok in
|
||||
'') echo >&2 'Please enter 1 for Yes, or 2 for No.';;
|
||||
?*) break
|
||||
esac
|
||||
done
|
||||
doselect Yes No
|
||||
ok=$select_result
|
||||
case $ok in
|
||||
'') exit 1;;
|
||||
Yes) break
|
||||
esac
|
||||
do :
|
||||
do coord=
|
||||
done
|
||||
|
||||
case $SHELL in
|
||||
@ -312,7 +574,7 @@ case $SHELL in
|
||||
*) file=.profile line="TZ='$TZ'; export TZ"
|
||||
esac
|
||||
|
||||
echo >&2 "
|
||||
test -t 1 && say >&2 "
|
||||
You can make this change permanent for yourself by appending the line
|
||||
$line
|
||||
to the file '$file' in your home directory; then log out and log in again.
|
||||
@ -320,4 +582,4 @@ to the file '$file' in your home directory; then log out and log in again.
|
||||
Here is that TZ value again, this time on standard output so that you
|
||||
can use the $0 command in shell scripts:"
|
||||
|
||||
echo "$TZ"
|
||||
say "$TZ"
|
||||
|
111
usno1988
111
usno1988
@ -1,111 +0,0 @@
|
||||
# @(#)usno1988 8.1
|
||||
#
|
||||
# From Arthur David Olson (1989-01-19):
|
||||
#
|
||||
# Here's some United States Naval Observatory time zone data from
|
||||
# February 1988. It's here mostly to convince you that the USNO has indeed
|
||||
# been updating its files (see its 1989 data elsewhere).
|
||||
#
|
||||
ANDORRA 1 H AHEAD OF UTC
|
||||
ARGENTINA 3 H BEHIND UTC
|
||||
BRASIL WEST 5 H BEHIND UTC (CRUZEIRO DO SUL)
|
||||
BRASIL CENTRAL 4 H BEHIND UTC (MANAUS)
|
||||
BRASIL EAST 3 H BEHIND UTC COASTAL STATES, RIO, SP, BRASILIA
|
||||
BRASIL 2 H BEHIND UTC ATLANTIC ISLANDS
|
||||
BRAZIL 5 H BEHIND UTC WEST (CRUZEIRO DO SUL)
|
||||
BRAZIL 4 H BEHIND UTC CENTRAL (MANAUS)
|
||||
BRAZIL 3 H BEHIND UTC COASTAL STATES, RIO, SP, BRASILIA
|
||||
BRAZIL 3 H BEHIND UTC FOR MOST MAJOR AIRPORTS.
|
||||
BRAZIL 2 H BEHIND UTC ATLANTIC ISLANDS
|
||||
BULGARIA 2 H AHEAD OF UTC WINTER
|
||||
BULGARIA 3 H AHEAD OF UTC SUMMER MAR31 - SEP 85, 0100 LOCAL
|
||||
CHINA 8 H AHEAD OF UTC; ALL OF CHINA, INCL TAIWAN
|
||||
CUBA 5 H BEHIND UTC IN WINTER
|
||||
CUBA 4 H BEHIND UTC MAY 8 - OCT 8
|
||||
CYPRUS 2 H AHEAD UTC IN WINTER
|
||||
CYPRUS 3 H AHEAD UTC MAR 25 - SEP 30
|
||||
DENMARK 1 H AHEAD UTC IN WINTER
|
||||
DENMARK 2 H AHEAD UTC MAR 31 - SEP 30 , 0200 LOCAL
|
||||
DENMK. FAEROE IS 1 H AHEAD UTC MAR 31 - SEP 30 , 0200 LOCAL
|
||||
EGYPT 2 H AHEAD UTC
|
||||
EGYPT 3 H AHEAD UTC SUMMER (AFTER RAMADAN)
|
||||
ENGLAND ON UTC IN WINTER; WALES, SCOTLAND, N.I., CH.IS.
|
||||
ENGLAND 1 H AHEAD OF UTC; SUMMER TIL 28 OCT 0200 LOCAL
|
||||
FINLAND 2 H AHEAD OF UTC IN WINTER
|
||||
FINLAND 3 H AHEAD OF UTC MAR 25 - SEP 30
|
||||
FRANCE 1 H AHEAD OF UTC IN WINTER
|
||||
FRANCE 2 H AHEAD OF UTC MAR 31 - SEP 30 , 0100 LOCAL
|
||||
GREECE 2 H AHEAD OF UTC IN WINTER
|
||||
GREECE 3 H AHEAD OF UTC IN SUMMER EFF. 31MAR85 02/03 LOCAL
|
||||
GREECE 3 H AHEAD OF UTC MAR 25 - SEP 30
|
||||
GREENLAND 4 H BEHIND UTC IN THULE AIRBASE YEAR ROUND
|
||||
GREENLAND 3 H BEHIND UTC IN WINTER AT SONDRESTROM
|
||||
GREENLAND 2 H BEHIND UTC 30 MAR - 30 SEP 2200 LOCAL AT -"-
|
||||
GREENLAND 2 H BEHIND UTC AROUND SCORESBY SUND
|
||||
ICELAND ON UTC
|
||||
IRAN 3.5H AHEAD OF UTC
|
||||
IRELAND ON UTC IN WINTER
|
||||
IRELAND 1 H AHEAD OF UTC MAR 31 - OCT 23 0200 LOCAL
|
||||
ITALY 1 H AHEAD OF UTC IN WINTER
|
||||
ITALY 2 H AHEAD OF UTC MAR 31 - SEP 30, 0030 LOCAL
|
||||
JAMAICA 5 H BEHIND UTC IN WINTER
|
||||
JAMAICA 4 H BEHIND UTC APR 29 - OCT 29
|
||||
LIBYA 2 H AHEAD OF UTC
|
||||
MEXICO BAJA CAL N 8 H BEHIND UTC IN WINTER; NORTH BAJA CAL, TIJUANA
|
||||
MEXICO BAJA CAL N 7 H BEHIND UTC APR 29 - OCT 29
|
||||
MEXICO BAJA CAL S 7 H BEHIND UTC ALL YEAR; MAZATLAN
|
||||
MEXICO CENTRAL 6 H BEHIND UTC ALL YEAR; MEXICO CITY
|
||||
MONACO 1 H AHEAD UTC IN WINTER
|
||||
MONACO 2 H AHEAD UTC MAR 25 - SEP30
|
||||
PARAGUAY 4 H BEHIND UTC IN WINTER
|
||||
PARAGUAY 3 H BEHIND UTC SEP 30 - MAR 30
|
||||
POLAND 1 H AHEAD OF UTC IN WINTER
|
||||
POLAND 2 H AHEAD OF UTC MAR 24 - SEP 0200 LOCAL
|
||||
PORTUGAL ON UTC IN WINTER
|
||||
PORTUGAL 1 H AHEAD OF UTC IN SUMMER MAR 31 - SEP 29 0100 LOCAL
|
||||
PORTUGAL AZORES 1 H BEHIND UTC IN WINTER
|
||||
PORTUGAL AZORES ON UTC IN SUMMER MAR 31 - SEP 29
|
||||
PORTUGAL MADEIRA ON UTC ALL YEAR;
|
||||
ROMANIA 2 H AHEAD OF UTC IN WINTER
|
||||
ROMANIA 3 H AHEAD OF UTC APR 3 - SEP 24
|
||||
SCOTLAND SEE ENGLAND
|
||||
SWITZERLAND 1 H AHEAD OF UTC IN WINTER
|
||||
SWITZERLAND 2 H AHEAD OF UTC MAR 31 - SEP 30 0200 LOCAL
|
||||
TURKEY 3 H AHEAD OF UTC
|
||||
USA EASTERN 5 H BEHIND UTC IN WINTER; NEW YORK, WASHINGTON
|
||||
USA EASTERN 4 H BEHIND UTC APR 29 - OCT 29
|
||||
USA CENTRAL 6 H BEHIND UTC IN WINTER; CHICAGO, HOUSTON
|
||||
USA CENTRAL 5 H BEHIND UTC APR 29 - OCT 29
|
||||
USA MOUNTAIN 7 H BEHIND UTC IN WINTER; DENVER
|
||||
USA MOUNTAIN 6 H BEHIND UTC APR 29 - OCT 29
|
||||
USA PACIFIC 8 H BEHIND UTC IN WINTER; L.A., SAN FRANCISCO
|
||||
USA PACIFIC 7 H BEHIND UTC APR 29 - OCT 29
|
||||
USA ALASKA STD 9 H BEHIND UTC IN WINTER; MOST OF ALASKA (AKST)
|
||||
USA ALASKA STD 8 H BEHIND UTC APR 29 - OCT 29 (AKDT)
|
||||
USA ALEUTIAN 10 H BEHIND UTC IN WINTER; ISLANDS WEST OF 170W
|
||||
USA - " - 9 H BEHIND UTC APR 29 - OCT 29
|
||||
USA HAWAII 10 H BEHIND UTC ALL YEAR;
|
||||
USA BERING 11 H BEHIND UTC ALL YEAR; SAMOA, MIDWAY
|
||||
USSR WEST EUROP 3 H AHEAD OF UTC IN WINTER; LENINGRAD, MOSCOW
|
||||
USSR WEST EUROP 4 H AHEAD OF UTC APR 1 - SEP 30
|
||||
USSR CENTRAL EUR 4 H AHEAD OF UTC IN WINTER; ROSTOV, BAKU
|
||||
USSR CENTRAL EUR 5 H AHEAD OF UTC APR 1 - SEP 30
|
||||
USSR EAST EUROP 5 H AHEAD OF UTC IN WINTER; SVERDLOVSK
|
||||
USSR EAST EUROP 6 H AHEAD OF UTC APR 1 - SEP 30
|
||||
USSR WEST SIBERIAN 6 H AHEAD OF UTC IN WINTER; TASHKENT, ALMA ATA
|
||||
USSR WEST SIBERIAN 7 H AHEAD OF UTC APR 1 - SEP 30
|
||||
USSR WEST-CENTRAL 7 H AHEAD OF UTC IN WINTER; NOVOSIBIRSK
|
||||
USSR WEST-CENTRAL 8 H AHEAD OF UTC APR 1 - SEP 30
|
||||
USSR WEST-CENTRAL 8 H AHEAD OF UTC IN WINTER; IRKUTSK
|
||||
USSR WEST-CENTRAL 9 H AHEAD OF UTC APR 1 - SEP 30
|
||||
USSR CENTRAL SIB 9 H AHEAD OF UTC IN WINTER; YAKUTSK
|
||||
USSR CENTRAL SIB 10 H AHEAD OF UTC APR 1 - SEP 30
|
||||
USSR CENTRAL SIB 10 H AHEAD OF UTC IN WINTER; VLADIVOSTOK
|
||||
USSR CENTRAL SIB 11 H AHEAD OF UTC APR 1 - SEP 30
|
||||
USSR EAST SIBERIA 11 H AHEAD OF UTC IN WINTER; MAGADAN
|
||||
USSR EAST SIBERIA 12 H AHEAD OF UTC APR 1 - SEP 30
|
||||
USSR EAST SIBERIA 12 H AHEAD OF UTC IN WINTER; PETROPAVLOVSK
|
||||
USSR EAST SIBERIA 13 H AHEAD OF UTC APR 1 - SEP 30
|
||||
USSR EAST SIBERIA 13 H AHEAD OF UTC IN WINTER; UELEN
|
||||
USSR EAST SIBERIA 14 H AHEAD OF UTC APR 1 - SEP 30
|
||||
WALES SEE ENGLAND
|
452
usno1989
452
usno1989
@ -1,452 +0,0 @@
|
||||
# @(#)usno1989 8.1
|
||||
#
|
||||
# From Arthur David Olson (1989-01-19):
|
||||
#
|
||||
# Here's time zone information from the United States Naval Observatory;
|
||||
# no corrections have been made, and there are some obvious challenges.
|
||||
# The USNO warns:
|
||||
# DUE TO FREQUENT CHANGES IN THE LOCAL LAWS GOVERNING DAYLIGHT
|
||||
# SAVING TIME, WE CANNOT GUARANTEE THE ACCURACY OF THIS
|
||||
# INFORMATION. PLEASE ALERT US TO ANY DISCREPANCY YOU MAY
|
||||
# DISCOVER.
|
||||
#
|
||||
AFGHANISTAN 4.5H AHEAD OF UTC
|
||||
ALBANIA 1 H AHEAD OF UTC
|
||||
ALBANIA 2 H AHEAD OF UTC MAR 27 - SEP 24
|
||||
ALBANIA (ESTIMATED)
|
||||
ALGERIA 1 H AHEAD OF UTC
|
||||
AMERICAN SAMOA 11 H BEHIND UTC
|
||||
ANDORRA 1 H AHEAD OF UTC
|
||||
ANDORRA 2 H AHEAD OF UTC MAR 27 - SEP 24
|
||||
ANDORRA (ESTIMATED)
|
||||
ANGOLA 1 H AHEAD OF UTC
|
||||
ARGENTINA 3 H BEHIND UTC
|
||||
ARUBA 4 H BEHIND UTC ALSO BONAIRE, CURACAO,
|
||||
ARUBA ST.MAARTEN
|
||||
AUSTRALIA WEST 8 H AHEAD OF UTC PERTH, EXMOUTH
|
||||
AUSTRALIA N.T. 9.5H AHEAD OF UTC DARWIN NO ADVANCED TIME
|
||||
AUSTRALIA N.T. IN SUMMER
|
||||
AUSTRALIA SOUTH 9.5H AHEAD OF UTC ADELAIDE
|
||||
AUSTRALIA INCLUDING BROKEN HILL, NSW
|
||||
AUSTRALIA SOUTH 10.5H AHEAD OF UTC ADELAIDE OCT 30, '88-MAR
|
||||
AUSTRALIA SOUTH 18, '89 INCLUDING BROKEN
|
||||
AUSTRIALIA SOUTH HILL, NSW
|
||||
AUSTRALIA QUEENL 10 H AHEAD OF UTC
|
||||
AUSTRALIA NSW 10 H AHEAD OF UTC SYDNEY
|
||||
AUSTRALIA NSW 11 H AHEAD OF UTC SYDNEY OCT 30, '88-MAR 18,
|
||||
AUSTRALIA NSW '89
|
||||
AUSTRALIA TASM. 10 H AHEAD OF UTC HOBART
|
||||
AUSTRALIA TASM. 11 H AHEAD OF UTC HOBART OCT 30, '88-MAR 18,
|
||||
AUSTRALIA TASM. '89
|
||||
AUSTRIA 1 H AHEAD OF UTC
|
||||
AUSTRIA 2 H AHEAD OF UTC MAR 27 - SEPT 24
|
||||
AZORES SEE PORTUGAL
|
||||
BAHAMAS 5 H BEHIND UTC EXCLUDING TURKS AND CAICOS
|
||||
BAHAMAS ISLANDS)
|
||||
BAHAMAS 4 H BEHIND UTC APR 3 - OCT 29 (SAME
|
||||
BAHAMAS EXCLUSION)
|
||||
BAHRAIN 3 H AHEAD OF UTC
|
||||
BANGLADESH 6 H AHEAD OF UTC
|
||||
BARBADOS 4 H BEHIND UTC
|
||||
BELGIUM 1 H AHEAD OF UTC
|
||||
BELGIUM 2 H AHEAD OF UTC MAR 27 - SEP 24
|
||||
BELIZE 6 H BEHIND UTC
|
||||
BENIN PEOPLES REP 1 H AHEAD OF UTC DAHOMEY
|
||||
BERMUDA 4 H BEHIND UTC
|
||||
BERMUDA 3 H BEHIND UTC APR 3 - OCT 29
|
||||
BHUTAN 6 H AHEAD OF UTC
|
||||
BOLIVIA 4 H BEHIND UTC
|
||||
BONAIRE 4 H BEHIND UTC ALSO ARUBA,CURACAO,
|
||||
BONAIRE ST.MAARTEN, SABA
|
||||
BOTSWANA 2 H AHEAD OF UTC
|
||||
BRAZIL WEST 5 H BEHIND UTC TERRITORY OF ACRE
|
||||
BRAZIL WEST 4 H BEHIND UTC ACRE OCT 23, '88-FEB 11,
|
||||
BRAZIL '89 (ESTIMATED)
|
||||
BRAZIL CENTRAL 4 H BEHIND UTC MANAUS
|
||||
BRAZIL CENTRAL 3 H BEHIND UTC MANAUS OCT 23, '88-FEB 11,
|
||||
BRAZIL CENTRAL '89 (ESTIMATED)
|
||||
BRAZIL EAST 3 H BEHIND UTC COASTAL STATES, RIO, SAO
|
||||
BRAZIL EAST PAULO, BRASILIA
|
||||
BRAZIL EAST 2 H BEHIND UTC COASTAL STATES, RIO, SAO
|
||||
BRAZIL PAULO, BRASILIA OCT 23,
|
||||
BRAZIL '88-FEB 11, '89
|
||||
BRAZIL (ESTIMATED)
|
||||
BRAZIL 2 H BEHIND UTC ATLANTIC ISLANDS, FERNANDO
|
||||
BRAZIL DE NORONHA
|
||||
BRAZIL 1 H BEHIND UTC OCT 23, '88-FEB 11, '89
|
||||
BRAZIL (ESTIMATED)
|
||||
BRAZIL 3 H BEHIND UTC FOR MOST MAJOR AIRPORTS.
|
||||
BRITISH VIRGIN I. 4 H BEHIND UTC
|
||||
BRUNEI 8 H AHEAD OF UTC
|
||||
BULGARIA 2 H AHEAD OF UTC
|
||||
BULGARIA 3 H AHEAD OF UTC MAR 27 - SEP 24
|
||||
BURKINA FASO ON UTC
|
||||
BURMA 6.5H AHEAD OF UTC
|
||||
BURUNDI 2 H AHEAD OF UTC
|
||||
CAMBODIA SEE KAMPUCHEA
|
||||
CAMEROON 1 H AHEAD OF UTC
|
||||
CANADA NEW FDL 3.5H BEHIND UTC ST.JOHN'S
|
||||
CANADA NEW FDL 1.5H BEHIND UTC APR 3 - OCT 29
|
||||
CANADA ATLANTIC 4 H BEHIND UTC HALIFAX
|
||||
CANADA ATLANTIC 3 H BEHIND UTC APR 3 - OCT 29
|
||||
CANADA EASTERN 5 H BEHIND UTC TORONTO, MONTREAL, OTTAWA
|
||||
CANADA EASTERN 4 H BEHIND UTC APR 3 - OCT 29
|
||||
CANADA CENTRAL 6 H BEHIND UTC REGINA, WINNIPEG
|
||||
CANADA CENTRAL 5 H BEHIND UTC APR 3 - OCT 29
|
||||
CANADA MOUNTAIN 7 H BEHIND UTC CALGARY, EDMONTON
|
||||
CANADA MOUNTAIN 6 H BEHIND UTC APR 3 - OCT 29
|
||||
CANADA PACIFIC 8 H BEHIND UTC VANCOUVER
|
||||
CANADA PACIFIC 7 H BEHIND UTC APR 3 - OCT 29
|
||||
CANADA YUKON SAME AS PACIFIC DAWSON
|
||||
CAPE VERDE 1 H BEHIND UTC
|
||||
CAYMAN ISLANDS 5 H BEHIND UTC
|
||||
CAROLINE ISLAND 10 H AHEAD OF UTC EXCLUDING PONAPE IS.,
|
||||
CAROLINE ISLAND KUSAIE, AND PINGELAP
|
||||
CENTRAL AFRICA 1 H AHEAD OF UTC
|
||||
CEYLON 5.5H AHEAD OF UTC, SEE SRI LANKA
|
||||
CHAD 1 H AHEAD OF UTC
|
||||
CHANNEL ISLANDS SEE ENGLAND
|
||||
CHILE 4 H BEHIND UTC CONTINENTAL
|
||||
CHILE 3 H BEHIND UTC OCT 9, '88-MAR 11, '89
|
||||
CHILE 6 H BEHIND UTC EASTER ISLAND
|
||||
CHILE 5 H BEHIND UTC OCT 9, '88-MAR 11, '89
|
||||
CHINA 8 H AHEAD OF UTC ALL OF CHINA, INCL TAIWAN
|
||||
CHINA 9 H AHEAD OF UTC APR 17 - SEP 10
|
||||
COCOS (Keeling) I. 6.5H AHEAD OF UTC
|
||||
COLOMBIA 5 H BEHIND UTC
|
||||
COMOROS 3 H AHEAD OF UTC
|
||||
CONGO 1 H AHEAD OF UTC
|
||||
COOK ISLANDS 10 H BEHIND UTC
|
||||
COOK ISLANDS 9.5H BEHIND UTC OCT 30, '88-MAR 24, '89
|
||||
COOK ISLANDS (ESTIMATED)
|
||||
COSTA RICA 6 H BEHIND UTC
|
||||
COTE D'IVOIRE ON UTC
|
||||
CUBA 5 H BEHIND UTC
|
||||
CUBA 4 H BEHIND UTC MAR 20 - OCT 8
|
||||
CURACAO 4 H BEHIND UTC ALSO BONAIRE, ARUBA,
|
||||
CURACAO ST.MAARTEN
|
||||
CYPRUS 2 H AHEAD OF UTC
|
||||
CYPRUS 3 H AHEAD OF UTC MAR 27 - SEP 24
|
||||
CZECHOSLOVAKIA 1 H AHEAD OF UTC
|
||||
CZECHOSLOVAKIA 2 H AHEAD OF UTC MAR 27 - SEP 24
|
||||
DENMARK 1 H AHEAD OF UTC
|
||||
DENMARK 2 H AHEAD OF UTC MAR 27 - SEP 24
|
||||
DENMK. FAEROE IS 1 H AHEAD OF UTC MAR 27 - SEP 24
|
||||
DJIBOUTI 3 H AHEAD OF UTC
|
||||
DOMINICA 4 H BEHIND UTC
|
||||
DOMINICAN REP 4 H BEHIND UTC
|
||||
ECUADOR 5 H BEHIND UTC CONTINENTAL
|
||||
ECUADOR 6 H BEHIND UTC GALAPAGOS ISLANDS
|
||||
EGYPT 2 H AHEAD OF UTC
|
||||
EGYPT 3 H AHEAD OF UTC MAY 17 - SEP 30 (AFTER
|
||||
EGYPT RAMADAN)
|
||||
EL SALVADOR 6 H BEHIND UTC
|
||||
ENGLAND ON UTC (WALES, SCOTLAND, N.I.,
|
||||
ENGLAND CH. IS.)
|
||||
ENGLAND 1 H AHEAD OF UTC MAR 27 - OCT 22
|
||||
ENEZUELA 4 H BEHIND UTC
|
||||
EQUITORIAL GUINEA 1 H AHEAD OF UTC
|
||||
ETHIOPIA 3 H AHEAD OF UTC
|
||||
FALKLAND ISLANDS 4 H BEHIND UTC
|
||||
FALKLAND ISLANDS 3 H BEHIND UTC SEP 11, '88-APR 15, '89
|
||||
FALKLAND ISLANDS (ESTIMATED)
|
||||
FAROE ISLAND ON UTC
|
||||
FAROE ISLAND 1 H AHEAD OF UTC MAR 27 - SEP 24
|
||||
FIJI 12 H AHEAD OF UTC
|
||||
FINLAND 2 H AHEAD OF UTC
|
||||
FINLAND 3 H AHEAD OF UTC MAR 27 - SEP 24
|
||||
FRANCE 1 H AHEAD OF UTC
|
||||
FRANCE 2 H AHEAD OF UTC MAR 27 - SEP 24
|
||||
FRENCH GUIANA 3 H BEHIND UTC
|
||||
FRENCH POLYNESIA 9 H BEHIND UTC GAMBIER ISLAND
|
||||
FRENCH POLYNESIA 9.5H BEHIND UTC MARQUESAS ISLANDS
|
||||
FRENCH POLYNESIA 10 H BEHIND UTC SOCIETY ISLANDS, TUBUAI
|
||||
FRENCH POLYNESIA ISLANDS, TUAMOTU ISLAND,
|
||||
FRENCH POLYNESIA TAHITI
|
||||
GABON 1 H AHEAD OF UTC
|
||||
GAMBIA ON UTC
|
||||
GERMANY ALL 1 H AHEAD OF UTC
|
||||
GERMANY ALL 2 H AHEAD OF UTC MAR 27 - SEP 24
|
||||
GHANA ON UTC
|
||||
GIBRALTAR 1 H AHEAD OF UTC
|
||||
GIBRALTAR 2 H AHEAD OF UTC MAR 27 - SEP 24
|
||||
GREECE 2 H AHEAD OF UTC
|
||||
GREECE 3 H AHEAD OF UTC MAR 27 - SEP 24
|
||||
GREENLAND 4 H BEHIND UTC THULE AIRBASE YEAR ROUND
|
||||
GREENLAND 3 H BEHIND UTC ANGMAGSSALIK AND W. COAST
|
||||
GREENLAND 2 H BEHIND UTC MAR 27 - SEP 24
|
||||
GREENLAND 1 H BEHIND UTC SCORESBYSUND
|
||||
GREENLAND ON UTC MAR 27 - SEP 24
|
||||
GRENADA 4 H BEHIND UTC
|
||||
GUADELOUPE 4 H BEHIND UTC ST. BARTHELEMY, NORTHERN
|
||||
GUADELOUPE ST. MARTIN MARTINIQUE
|
||||
GUAM 10 H AHEAD OF UTC
|
||||
GUATEMALA 6 H BEHIND UTC
|
||||
GUINEA ON UTC
|
||||
GUINEA BISSAU ON UTC
|
||||
GUINEA REPUBLIC ON UTC
|
||||
GUINEA EQUATORIAL 1 H AHEAD OF UTC
|
||||
GUYANA 3 H BEHIND UTC
|
||||
HAITI 5 H BEHIND UTC
|
||||
HAITI 4 H BEHIND UTC APR 3 - OCT 29
|
||||
HOLLAND SEE NETHERLANDS
|
||||
HONDURAS 6 H BEHIND UTC
|
||||
HONG KONG 8 H AHEAD OF UTC
|
||||
HUNGARY 1 H AHEAD OF UTC
|
||||
HUNGARY 2 H AHEAD OF UTC MAR 27 - SEP 24
|
||||
ICELAND ON UTC
|
||||
INDIA 5.5H AHEAD OF UTC INCLUDING ANDAMAN ISLANDS
|
||||
INDONESIA WEST 7 H AHEAD OF UTC SUMATRA, JAVA, BALI,
|
||||
INDONESIA WEST JAKARTA
|
||||
INDONESIA CENTRAL 8 H AHEAD OF UTC KALIMANTAN, SULAWESI
|
||||
INDONESIA EAST 9 H AHEAD OF UTC IRIAN, BARAT
|
||||
IRAN 3.5H AHEAD OF UTC
|
||||
IRAQ 3 H AHEAD OF UTC
|
||||
IRAQ 4 H AHEAD OF UTC APR 1 - SEP 30
|
||||
IRELAND ON UTC
|
||||
IRELAND 1 H AHEAD OF UTC MAR 27 - OCT 22
|
||||
ISRAEL 2 H AHEAD OF UTC
|
||||
ISRAEL 3 H AHEAD OF UTC APR 10 - SEP 3
|
||||
ITALY 1 H AHEAD OF UTC
|
||||
ITALY 2 H AHEAD OF UTC MAR 27 - SEP 24
|
||||
IVORY COAST ON UTC
|
||||
IWAN 8 H AHEAD OF UTC
|
||||
JAMAICA 5 H BEHIND UTC
|
||||
JAPAN 9 H AHEAD OF UTC
|
||||
JOHNSTON ISLAND 10 H BEHIND UTC
|
||||
JORDAN 2 H AHEAD OF UTC
|
||||
JORDAN 3 H AHEAD OF UTC APR 1 - OCT 6
|
||||
KAMPUCHEA 7 H AHEAD OF UTC
|
||||
KENYA 3 H AHEAD OF UTC
|
||||
KIRIBATI, REP OF 12 H AHEAD OF UTC CANTON, ENDERBURY ISLANDS
|
||||
KIRIBATI, REP OF 11 H AHEAD OF UTC CHRISTMAS ISLAND
|
||||
KOREA 9 H AHEAD OF UTC
|
||||
KOREA, REP OF 9 H AHEAD OF UTC
|
||||
KOREA, REP OF 10 H AHEAD OF UTC MAY 8 - OCT 8
|
||||
KUWAIT 3 H AHEAD OF UTC
|
||||
KUSAIE, PINGELAP 12 H AHEAD OF UTC INCLUDING MARSHALL IS.,
|
||||
KUSAIE, PINGELAP EXCLUDING KWAJALEIN)
|
||||
KWAJALEIN 12 H BEHIND UTC
|
||||
LAOS 7 H AHEAD OF UTC
|
||||
LEBANON 2 H AHEAD OF UTC
|
||||
LEBANON 3 H AHEAD OF UTC JUN 1 - OCT 31
|
||||
LEEWARD ISLANDS 4 H BEHIND UTC ANTIGUA, DOMINICA,
|
||||
LEEWARD ISLANDS MONTSERRAT, ST.
|
||||
LEEWARD ISLAANDS CHRISTOPHER, ST. KITTS,
|
||||
LEEWARD ISLANDS NEVIS, ANGUILLA
|
||||
LESOTHO 2 H AHEAD OF UTC
|
||||
LIBERIA ON UTC
|
||||
LIBYAN ARAB 1 H AHEAD OF UTC JAMAHIRIYA/LIBYA
|
||||
LIBYAN ARAB 2 H AHEAD OF UTC APR 1 - SEP 30 JAMAHIRIYA/LIBYA
|
||||
LIECHTENSTEIN 1 H AHEAD OF UTC
|
||||
LIECHTENSTEIN 2 H AHEAD OF UTC MAR 27 - SEP 24
|
||||
LUXEMBOURG 1 H AHEAD OF UTC
|
||||
LUXEMBOURG 2 H AHEAD OF UTC MAR 27 - SEP 24
|
||||
MACAO 8 H AHEAD OF UTC
|
||||
MADAGASCAR 3 H AHEAD OF UTC
|
||||
MADEIRA SEE PORTUGAL
|
||||
MALAWI 2 H AHEAD OF UTC
|
||||
MALAYSIA 8 H AHEAD OF UTC
|
||||
MALDIVES 5 H AHEAD OF UTC
|
||||
MALI ON UTC
|
||||
MALTA 1 H AHEAD OF UTC
|
||||
MALTA 2 H AHEAD OF UTC MAR 27 - SEP 24
|
||||
MARTINIQUE 4 H BEHIND UTC
|
||||
MAURITANIA ON UTC
|
||||
MAURITIUS 4 H AHEAD OF UTC
|
||||
MARIANA ISLAND 10 H AHEAD OF UTC EXCLUDING GUAM
|
||||
MEXICO BAJA CAL N 7 H BEHIND UTC BAJA CALIFORNIA SUR AND
|
||||
MEXICO BAJA CAL N N. PACIFIC COAST (STATES
|
||||
MEXICO BAJA CAL N OF SINALOA AND SONORA)
|
||||
MEXICO BAJA CAL N 8 H BEHIND UTC ABOVE 28TH PARALLAL APR 3
|
||||
MEXICO BAJA CAL N - OCT 29
|
||||
MEXICO BAJA CAL N 7 H BEHIND UTC ABOVE 28TH PARALLAL APR 3
|
||||
MEXICO BAJA CAL N - 0CT 29
|
||||
MEXICO 6 H BEHIND UTC STATES OF DURANGO,
|
||||
MEXICO COAHUILA, NUEVO LEON,
|
||||
MEXICO TAMAULIPAS
|
||||
MEXICO 5 H BEHIND UTC STATES OF DURANGO,
|
||||
MEXICO COAHUILA, NUEVO LEON,
|
||||
MEXICO TAMAULIPAS APR 3 - OCT 29
|
||||
MEXICO 6 H BEHIND UTC GENERAL MEXICO, STATES OF
|
||||
MEXICO CAMPECHE, QUINTANA ROO AND
|
||||
MEXICO YUCATAN
|
||||
MIDWAY ISLAND 11 H BEHIND UTC
|
||||
MONACO 1 H AHEAD OF UTC
|
||||
MONACO 2 H AHEAD OF UTC MAR 27 - SEP 24
|
||||
MONGOLIA 8 H AHEAD OF UTC
|
||||
MONGOLIA 9 H AHEAD OF UTC MAR 27 - SEP 24
|
||||
MONTSERRAT 4 H BEHIND UTC
|
||||
MOROCCO ON UTC
|
||||
MOZAMBIQUE 2 H AHEAD OF UTC
|
||||
NAMIBIA 2 H AHEAD OF UTC
|
||||
NAURU, REP OF 12 H AHEAD OF UTC
|
||||
NEPAL 5H45M AHEAD OF UTC
|
||||
NETHERLANDS 1 H AHEAD OF UTC
|
||||
NETHERLANDS 2 H AHEAD OF UTC MAR 27 - SEP 24
|
||||
NETHERLANDS 4 H BEHIND UTC ANTILLES AND SOUTHERN ST.
|
||||
NETHERLANDS MAARTEN
|
||||
NEW CALEDONIA 11 H AHEAD OF UTC
|
||||
NEW HEBRIDES SEE VANUATU
|
||||
NEW ZEALAND 12 H AHEAD OF UTC (EXCLUDING CHATHAM ISLAND)
|
||||
NEW ZEALAND 13 H AHEAD OF UTC OCT 30, '88-MAR 4, '89
|
||||
NEW ZEALAND 12H45M AHEAD OF UTC CHATHAM ISLAND
|
||||
NICARAGUA 6 H BEHIND UTC
|
||||
NIGER 1 H AHEAD OF UTC
|
||||
NIGERIA 1 H AHEAD OF UTC
|
||||
NIUE ISLAND 11 H BEHIND UTC
|
||||
NORFOLK ISLAND 11H30M AHEAD OF UTC
|
||||
NORTHERN IRELAND ON UTC WALES, SCOTLAND, N.I.,
|
||||
NORTHERN IRELAND CH.IS.
|
||||
NORTHERN IRELAND 1 H AHEAD OF UTC MAR 27 - OCT 22
|
||||
NORWAY 1 H AHEAD OF UTC
|
||||
NORWAY 2 H AHEAD OF UTC MAR 27 - SEP 24
|
||||
OGO ON UTC
|
||||
OMAN 4 H AHEAD OF UTC
|
||||
PACIFIC ISLAND T.T.
|
||||
PALAU ISLAND 9 H AHEAD OF UTC
|
||||
PAKISTAN 5 H AHEAD OF UTC
|
||||
PANAMA 5 H BEHIND UTC
|
||||
PAPUA NEW GUINEA 10 H AHEAD OF UTC INCLUDING BOUGAINVILLE
|
||||
PAPUA NEW GUINEA ISLAND
|
||||
PARAGUAY 4 H BEHIND UTC
|
||||
PARAGUAY 3 H BEHIND UTC OCT 1, '88-MAR 31, '89
|
||||
PERU 5 H BEHIND UTC
|
||||
PHILIPPINES 8 H AHEAD OF UTC
|
||||
PONAPE ISLAND 11 H AHEAD OF UTC
|
||||
POLAND 1 H AHEAD OF UTC
|
||||
POLAND 2 H AHEAD OF UTC MAR 27 - SEP 24
|
||||
PORTUGAL MAINLAND ON UTC
|
||||
PORTUGAL MAINLAND 1 H AHEAD OF UTC MAR 27 - SEP 24
|
||||
PORTUGAL AZORES 1 H BEHIND UTC
|
||||
PORTUGAL AZORES ON UTC MAR 27 - SEP 24
|
||||
PORTUGAL MADEIRA ON UTC
|
||||
PORTUGAL MADEIRA 1 H AHEAD OF UTC MAR 27 - SEP 24
|
||||
PUERTO RICO 4 H BEHIND UTC
|
||||
QATAR 3 H AHEAD OF UTC
|
||||
ROMANIA 2 H AHEAD OF UTC
|
||||
ROMANIA 3 H AHEAD OF UTC MAR 27 - SEP 24
|
||||
RUSSIA SEE USSR
|
||||
RWANDA 2 H AHEAD OF UTC
|
||||
SABA 4 H BEHIND UTC ALSO BONAIRE, CURACAO,
|
||||
SAMOA 11 H BEHIND UTC
|
||||
SAN MARINO 1 H AHEAD OF UTC
|
||||
SAN MARINO 2 H AHEAD OF UTC MAR 27 - SEP 24
|
||||
SAN SALVADOR 6 H BEHIND UTC
|
||||
SAO TOME ISLAND ON UTC AND PRINCIPE ISLAND
|
||||
SAUDI ARABIA 3 H AHEAD OF UTC
|
||||
SCOTLAND SEE ENGLAND
|
||||
SENEGAL ON UTC
|
||||
SEYCHELLES 4 H AHEAD OF UTC
|
||||
SIERRA LEONE ON UTC
|
||||
SINGAPORE 8 H AHEAD OF UTC
|
||||
SOLOMON ISLANDS 11 H AHEAD OF UTC EXCLUDING BOUGAINVILLE
|
||||
SOLOMON ISLANDS ISLAND
|
||||
SOMALI 3 H AHEAD OF UTC
|
||||
SOUTH AFRICA 2 H AHEAD OF UTC
|
||||
SPAIN CANARY IS ON UTC
|
||||
SPAIN CANARY IS 1 H AHEAD OF UTC MAR 27 - SEP 24
|
||||
SPAIN 1 H AHEAD OF UTC CONTINENTAL, BALEARIC AND
|
||||
SPAIN MALLORCA ISLANDS
|
||||
SPAIN 2 H AHEAD OF UTC CONTINENTAL, BALEARIC AND
|
||||
SPAIN MALLORCA ISLANDS MAR 27 -
|
||||
SPAIN SEP 24
|
||||
SPAIN MAINLAND 1 H AHEAD OF UTC MELILLA
|
||||
SPAIN MAINLAND 2 H AHEAD OF UTC MAR 27 - SEP 24
|
||||
SRI LANKA 5H30M AHEAD OF UTC
|
||||
ST.MAARTEN
|
||||
ST.KITTS-NEVIS 4 H BEHIND UTC
|
||||
ST.LUCIA 4 H BEHIND UTC
|
||||
ST.PIERRE 3 H BEHIND UTC INCLUDING MIQUELON
|
||||
ST.PIERRE 2 H BEHIND UTC INLCUDING MIQUELON APR 3
|
||||
ST.PIERRE - OCT 29
|
||||
ST.VINCENT 4 H BEHIND UTC INCLUDING THE GRENADINES
|
||||
ST. HELENA ON UTC
|
||||
SURINAME 3 H BEHIND UTC
|
||||
SWAZILAND 2 H AHEAD OF UTC
|
||||
SWEDEN 1 H AHEAD OF UTC
|
||||
SWEDEN 2 H AHEAD OF UTC MAR 27 - SEP 24
|
||||
SWITZERLAND 1 H AHEAD OF UTC
|
||||
SWITZERLAND 2 H AHEAD OF UTC MAR 27 - SEP 24
|
||||
SYRIA 2 H AHEAD OF UTC
|
||||
SYRIA 3 H AHEAD OF UTC MAR 15 - OCT 30
|
||||
TAHITI 10 H BEHIND UTC
|
||||
TANZANIA 3 H AHEAD OF UTC
|
||||
THAILAND 7 H AHEAD OF UTC
|
||||
TRINIDAD / TOBAGO 4 H BEHIND UTC
|
||||
TUNISIA 1 H AHEAD OF UTC
|
||||
TUNISIA 2 H AHEAD OF UTC APR 10 - SEP 24
|
||||
TURKEY 2 H AHEAD OF UTC
|
||||
TURKEY 3 H AHEAD OF UTC MAR 27 - SEP 24
|
||||
TURKS AND CAICOS 5 H BEHIND UTC
|
||||
TURKS AND CAICOS 4 H BEHIND UTC APR 3 - OCT 29
|
||||
TUVALU 12 H AHEAD OF UTC
|
||||
UDAN 2 H AHEAD OF UTC
|
||||
UGANDA 3 H AHEAD OF UTC
|
||||
UNITED ARAB EMIR. 4 H AHEAD OF UTC ABU DHABI, DUBAI, SHARJAH,
|
||||
UNITED ARAB EMIR RAS AL KHAIMAH
|
||||
UNITED KINGDOM ON UTC WALES, SCOTLAND, N.I., CH.
|
||||
UNITED KINGDOM IS.
|
||||
UNITED KINGDOM 1 H AHEAD OF UTC MAR 27 - OCT 22
|
||||
UNITED STATES SEE USA
|
||||
UPPER VOLTA ON UTC
|
||||
URUGUAY 3 H BEHIND UTC
|
||||
URUGUAY 2 H BEHIND UTC DEC 11, '88-FEB 25, '89
|
||||
URAGUAY (ESTIMATED)
|
||||
USA EASTERN 5 H BEHIND UTC NEW YORK, WASHINGTON
|
||||
USA EASTERN 4 H BEHIND UTC APR 3 - OCT 30
|
||||
USA CENTRAL 6 H BEHIND UTC CHICAGO, HOUSTON
|
||||
USA CENTRAL 5 H BEHIND UTC APR 3 - OCT 30
|
||||
USA MOUNTAIN 7 H BEHIND UTC DENVER
|
||||
USA MOUNTAIN 6 H BEHIND UTC APR 3 - OCT 30
|
||||
USA PACIFIC 8 H BEHIND UTC L.A., SAN FRANCISCO
|
||||
USA PACIFIC 7 H BEHIND UTC APR 3 - OCT 30
|
||||
USA ALASKA STD 9 H BEHIND UTC MOST OF ALASKA (AKST)
|
||||
USA ALASKA STD 8 H BEHIND UTC APR 3 - OCT 30 (AKDT)
|
||||
USA ALEUTIAN 10 H BEHIND UTC ISLANDS WEST OF 170W
|
||||
USA - " - 9 H BEHIND UTC APR 3 - OCT 30
|
||||
USA HAWAII 10 H BEHIND UTC
|
||||
USA BERING 11 H BEHIND UTC SAMOA, MIDWAY
|
||||
USA FOR SPECIFIC INFO ON USA ZONES/TIMES CALL DOT 202-426-4520
|
||||
USSR WEST EUROP 3 H AHEAD OF UTC LENINGRAD, MOSCOW
|
||||
USSR WEST EUROP 4 H AHEAD OF UTC APR 1 - SEP 30
|
||||
USSR CENTRAL EUR 4 H AHEAD OF UTC ROSTOV, BAKU
|
||||
USSR CENTRAL EUR 5 H AHEAD OF UTC APR 1 - SEP 30
|
||||
USSR EAST EUROP 5 H AHEAD OF UTC SVERDLOVSK
|
||||
USSR EAST EUROP 6 H AHEAD OF UTC APR 1 - SEP 30
|
||||
USSR WEST SIBERIAN 6 H AHEAD OF UTC TASHKENT, ALMA ATA
|
||||
USSR WEST SIBERIAN 7 H AHEAD OF UTC APR 1 - SEP 30
|
||||
USSR WEST-CENTRAL 7 H AHEAD OF UTC NOVOSIBIRSK
|
||||
USSR WEST-CENTRAL 8 H AHEAD OF UTC APR 1 - SEP 30
|
||||
USSR WEST-CENTRAL 8 H AHEAD OF UTC IRKUTSK
|
||||
USSR WEST-CENTRAL 9 H AHEAD OF UTC APR 1 - SEP 30
|
||||
USSR CENTRAL SIB 9 H AHEAD OF UTC YAKUTSK
|
||||
USSR CENTRAL SIB 10 H AHEAD OF UTC APR 1 - SEP 30
|
||||
USSR CENTRAL SIB 10 H AHEAD OF UTC VLADIVOSTOK
|
||||
USSR CENTRAL SIB 11 H AHEAD OF UTC APR 1 - SEP 30
|
||||
USSR EAST SIBERIA 11 H AHEAD OF UTC MAGADAN
|
||||
USSR EAST SIBERIA 12 H AHEAD OF UTC APR 1 - SEP 30
|
||||
USSR EAST SIBERIA 12 H AHEAD OF UTC PETROPAVLOVSK
|
||||
USSR EAST SIBERIA 13 H AHEAD OF UTC APR 1 - SEP 30
|
||||
USSR EAST SIBERIA 13 H AHEAD OF UTC UELEN
|
||||
USSR EAST SIBERIA 14 H AHEAD OF UTC APR 1 - SEP 30
|
||||
VANUATU 11 H AHEAD OF UTC (NEW HEBRIDES)
|
||||
VANUATU 12 H AHEAD OF UTC SEP 25, '88-MAR 25, '89
|
||||
VANUATU (ESTIMATED)
|
||||
VATICAN 1 H AHEAD OF UTC
|
||||
VATICAN 2 H AHEAD OF UTC MAR 27 - SEP 24
|
||||
VIETNAM 7 H AHEAD OF UTC
|
||||
VIRGIN ISLANDS 4 H BEHIND UTC ST.CROIX, ST.THOMAS,
|
||||
VIRGIN ISLANDS ST.JOHN
|
||||
WAKE ISLAND 12 H AHEAD OF UTC
|
||||
WALES SEE ENGLAND
|
||||
WALLIS/FUTUNA IS. 12 H AHEAD OF UTC
|
||||
WINDWARD ISLANDS 4 H BEHIND UTC GRENADA, ST. LUCIA
|
||||
YEMEN 3 H AHEAD OF UTC BOTH REPUBLICS
|
||||
YUGOSLAVIA 1 H AHEAD OF UTC
|
||||
YUGOSLAVIA 2 H AHEAD OF UTC MAR 27 - SEP 24
|
||||
ZAIRE EAST 1 H AHEAD OF UTC KINSHASA MBANDAKA
|
||||
ZAIRE WEST 2 H AHEAD OF UTC LUBUMBASHI, KASAI, KIVU,
|
||||
ZAIRE WEST HAUT-ZAIRE, SHABA
|
||||
ZAMBIA 2 H AHEAD OF UTC
|
||||
ZIMBABWE 2 H AHEAD OF UTC
|
452
usno1989a
452
usno1989a
@ -1,452 +0,0 @@
|
||||
# @(#)usno1989a 8.1
|
||||
#
|
||||
# From Arthur David Olson (1994-02-07):
|
||||
#
|
||||
# Here's time zone information from the United States Naval Observatory,
|
||||
# with corrections from Paul Eggert.
|
||||
# The USNO warns:
|
||||
# DUE TO FREQUENT CHANGES IN THE LOCAL LAWS GOVERNING DAYLIGHT
|
||||
# SAVING TIME, WE CANNOT GUARANTEE THE ACCURACY OF THIS
|
||||
# INFORMATION. PLEASE ALERT US TO ANY DISCREPANCY YOU MAY
|
||||
# DISCOVER.
|
||||
#
|
||||
AFGHANISTAN 4.5H AHEAD OF UTC
|
||||
ALBANIA 1 H AHEAD OF UTC
|
||||
ALBANIA 2 H AHEAD OF UTC MAR 27 - SEP 24
|
||||
ALBANIA (ESTIMATED)
|
||||
ALGERIA 1 H AHEAD OF UTC
|
||||
AMERICAN SAMOA 11 H BEHIND UTC
|
||||
ANDORRA 1 H AHEAD OF UTC
|
||||
ANDORRA 2 H AHEAD OF UTC MAR 27 - SEP 24
|
||||
ANDORRA (ESTIMATED)
|
||||
ANGOLA 1 H AHEAD OF UTC
|
||||
ARGENTINA 3 H BEHIND UTC
|
||||
ARUBA 4 H BEHIND UTC ALSO BONAIRE, CURACAO,
|
||||
ARUBA ST.MAARTEN
|
||||
AUSTRALIA WEST 8 H AHEAD OF UTC PERTH, EXMOUTH
|
||||
AUSTRALIA N.T. 9.5H AHEAD OF UTC DARWIN NO ADVANCED TIME
|
||||
AUSTRALIA N.T. IN SUMMER
|
||||
AUSTRALIA SOUTH 9.5H AHEAD OF UTC ADELAIDE
|
||||
AUSTRALIA INCLUDING BROKEN HILL, NSW
|
||||
AUSTRALIA SOUTH 10.5H AHEAD OF UTC ADELAIDE OCT 30, '88-MAR
|
||||
AUSTRALIA SOUTH 18, '89 INCLUDING BROKEN
|
||||
AUSTRIALIA SOUTH HILL, NSW
|
||||
AUSTRALIA QUEENL 10 H AHEAD OF UTC
|
||||
AUSTRALIA NSW 10 H AHEAD OF UTC SYDNEY
|
||||
AUSTRALIA NSW 11 H AHEAD OF UTC SYDNEY OCT 30, '88-MAR 18,
|
||||
AUSTRALIA NSW '89
|
||||
AUSTRALIA TASM. 10 H AHEAD OF UTC HOBART
|
||||
AUSTRALIA TASM. 11 H AHEAD OF UTC HOBART OCT 30, '88-MAR 18,
|
||||
AUSTRALIA TASM. '89
|
||||
AUSTRIA 1 H AHEAD OF UTC
|
||||
AUSTRIA 2 H AHEAD OF UTC MAR 27 - SEPT 24
|
||||
AZORES SEE PORTUGAL
|
||||
BAHAMAS 5 H BEHIND UTC EXCLUDING TURKS AND CAICOS
|
||||
BAHAMAS ISLANDS)
|
||||
BAHAMAS 4 H BEHIND UTC APR 3 - OCT 29 (SAME
|
||||
BAHAMAS EXCLUSION)
|
||||
BAHRAIN 3 H AHEAD OF UTC
|
||||
BANGLADESH 6 H AHEAD OF UTC
|
||||
BARBADOS 4 H BEHIND UTC
|
||||
BELGIUM 1 H AHEAD OF UTC
|
||||
BELGIUM 2 H AHEAD OF UTC MAR 27 - SEP 24
|
||||
BELIZE 6 H BEHIND UTC
|
||||
BENIN PEOPLES REP 1 H AHEAD OF UTC DAHOMEY
|
||||
BERMUDA 4 H BEHIND UTC
|
||||
BERMUDA 3 H BEHIND UTC APR 3 - OCT 29
|
||||
BHUTAN 6 H AHEAD OF UTC
|
||||
BOLIVIA 4 H BEHIND UTC
|
||||
BONAIRE 4 H BEHIND UTC ALSO ARUBA,CURACAO,
|
||||
BONAIRE ST.MAARTEN, SABA
|
||||
BOTSWANA 2 H AHEAD OF UTC
|
||||
BRAZIL WEST 5 H BEHIND UTC TERRITORY OF ACRE
|
||||
BRAZIL WEST 4 H BEHIND UTC ACRE OCT 23, '88-FEB 11,
|
||||
BRAZIL '89 (ESTIMATED)
|
||||
BRAZIL CENTRAL 4 H BEHIND UTC MANAUS
|
||||
BRAZIL CENTRAL 3 H BEHIND UTC MANAUS OCT 23, '88-FEB 11,
|
||||
BRAZIL CENTRAL '89 (ESTIMATED)
|
||||
BRAZIL EAST 3 H BEHIND UTC COASTAL STATES, RIO, SAO
|
||||
BRAZIL EAST PAULO, BRASILIA
|
||||
BRAZIL EAST 2 H BEHIND UTC COASTAL STATES, RIO, SAO
|
||||
BRAZIL PAULO, BRASILIA OCT 23,
|
||||
BRAZIL '88-FEB 11, '89
|
||||
BRAZIL (ESTIMATED)
|
||||
BRAZIL 2 H BEHIND UTC ATLANTIC ISLANDS, FERNANDO
|
||||
BRAZIL DE NORONHA
|
||||
BRAZIL 1 H BEHIND UTC OCT 23, '88-FEB 11, '89
|
||||
BRAZIL (ESTIMATED)
|
||||
BRAZIL 3 H BEHIND UTC FOR MOST MAJOR AIRPORTS.
|
||||
BRITISH VIRGIN I. 4 H BEHIND UTC
|
||||
BRUNEI 8 H AHEAD OF UTC
|
||||
BULGARIA 2 H AHEAD OF UTC
|
||||
BULGARIA 3 H AHEAD OF UTC MAR 27 - SEP 24
|
||||
BURKINA FASO ON UTC
|
||||
BURMA 6.5H AHEAD OF UTC
|
||||
BURUNDI 2 H AHEAD OF UTC
|
||||
CAMBODIA SEE KAMPUCHEA
|
||||
CAMEROON 1 H AHEAD OF UTC
|
||||
CANADA NEW FDL 3.5H BEHIND UTC ST.JOHN'S
|
||||
CANADA NEW FDL 1.5H BEHIND UTC APR 3 - OCT 29
|
||||
CANADA ATLANTIC 4 H BEHIND UTC HALIFAX
|
||||
CANADA ATLANTIC 3 H BEHIND UTC APR 3 - OCT 29
|
||||
CANADA EASTERN 5 H BEHIND UTC TORONTO, MONTREAL, OTTAWA
|
||||
CANADA EASTERN 4 H BEHIND UTC APR 3 - OCT 29
|
||||
CANADA CENTRAL 6 H BEHIND UTC REGINA, WINNIPEG
|
||||
CANADA CENTRAL 5 H BEHIND UTC APR 3 - OCT 29
|
||||
CANADA MOUNTAIN 7 H BEHIND UTC CALGARY, EDMONTON
|
||||
CANADA MOUNTAIN 6 H BEHIND UTC APR 3 - OCT 29
|
||||
CANADA PACIFIC 8 H BEHIND UTC VANCOUVER
|
||||
CANADA PACIFIC 7 H BEHIND UTC APR 3 - OCT 29
|
||||
CANADA YUKON SAME AS PACIFIC DAWSON
|
||||
CAPE VERDE 1 H BEHIND UTC
|
||||
CAYMAN ISLANDS 5 H BEHIND UTC
|
||||
CAROLINE ISLAND 10 H AHEAD OF UTC EXCLUDING PONAPE IS.,
|
||||
CAROLINE ISLAND KUSAIE, AND PINGELAP
|
||||
CENTRAL AFRICA 1 H AHEAD OF UTC
|
||||
CEYLON 5.5H AHEAD OF UTC, SEE SRI LANKA
|
||||
CHAD 1 H AHEAD OF UTC
|
||||
CHANNEL ISLANDS SEE ENGLAND
|
||||
CHILE 4 H BEHIND UTC CONTINENTAL
|
||||
CHILE 3 H BEHIND UTC OCT 9, '88-MAR 11, '89
|
||||
CHILE 6 H BEHIND UTC EASTER ISLAND
|
||||
CHILE 5 H BEHIND UTC OCT 9, '88-MAR 11, '89
|
||||
CHINA 8 H AHEAD OF UTC ALL OF CHINA, INCL TAIWAN
|
||||
CHINA 9 H AHEAD OF UTC APR 17 - SEP 10
|
||||
COCOS (Keeling) I. 6.5H AHEAD OF UTC
|
||||
COLOMBIA 5 H BEHIND UTC
|
||||
COMOROS 3 H AHEAD OF UTC
|
||||
CONGO 1 H AHEAD OF UTC
|
||||
COOK ISLANDS 10 H BEHIND UTC
|
||||
COOK ISLANDS 9.5H BEHIND UTC OCT 30, '88-MAR 24, '89
|
||||
COOK ISLANDS (ESTIMATED)
|
||||
COSTA RICA 6 H BEHIND UTC
|
||||
COTE D'IVOIRE ON UTC
|
||||
CUBA 5 H BEHIND UTC
|
||||
CUBA 4 H BEHIND UTC MAR 20 - OCT 8
|
||||
CURACAO 4 H BEHIND UTC ALSO BONAIRE, ARUBA,
|
||||
CURACAO ST.MAARTEN
|
||||
CYPRUS 2 H AHEAD OF UTC
|
||||
CYPRUS 3 H AHEAD OF UTC MAR 27 - SEP 24
|
||||
CZECHOSLOVAKIA 1 H AHEAD OF UTC
|
||||
CZECHOSLOVAKIA 2 H AHEAD OF UTC MAR 27 - SEP 24
|
||||
DENMARK 1 H AHEAD OF UTC
|
||||
DENMARK 2 H AHEAD OF UTC MAR 27 - SEP 24
|
||||
DENMK. FAEROE IS 1 H AHEAD OF UTC MAR 27 - SEP 24
|
||||
DJIBOUTI 3 H AHEAD OF UTC
|
||||
DOMINICA 4 H BEHIND UTC
|
||||
DOMINICAN REP 4 H BEHIND UTC
|
||||
ECUADOR 5 H BEHIND UTC CONTINENTAL
|
||||
ECUADOR 6 H BEHIND UTC GALAPAGOS ISLANDS
|
||||
EGYPT 2 H AHEAD OF UTC
|
||||
EGYPT 3 H AHEAD OF UTC MAY 17 - SEP 30 (AFTER
|
||||
EGYPT RAMADAN)
|
||||
EL SALVADOR 6 H BEHIND UTC
|
||||
ENGLAND ON UTC (WALES, SCOTLAND, N.I.,
|
||||
ENGLAND CH. IS.)
|
||||
ENGLAND 1 H AHEAD OF UTC MAR 27 - OCT 22
|
||||
EQUATORIAL GUINEA 1 H AHEAD OF UTC
|
||||
ETHIOPIA 3 H AHEAD OF UTC
|
||||
FALKLAND ISLANDS 4 H BEHIND UTC
|
||||
FALKLAND ISLANDS 3 H BEHIND UTC SEP 11, '88-APR 15, '89
|
||||
FALKLAND ISLANDS (ESTIMATED)
|
||||
FAROE ISLAND ON UTC
|
||||
FAROE ISLAND 1 H AHEAD OF UTC MAR 27 - SEP 24
|
||||
FIJI 12 H AHEAD OF UTC
|
||||
FINLAND 2 H AHEAD OF UTC
|
||||
FINLAND 3 H AHEAD OF UTC MAR 27 - SEP 24
|
||||
FRANCE 1 H AHEAD OF UTC
|
||||
FRANCE 2 H AHEAD OF UTC MAR 27 - SEP 24
|
||||
FRENCH GUIANA 3 H BEHIND UTC
|
||||
FRENCH POLYNESIA 9 H BEHIND UTC GAMBIER ISLAND
|
||||
FRENCH POLYNESIA 9.5H BEHIND UTC MARQUESAS ISLANDS
|
||||
FRENCH POLYNESIA 10 H BEHIND UTC SOCIETY ISLANDS, TUBUAI
|
||||
FRENCH POLYNESIA ISLANDS, TUAMOTU ISLAND,
|
||||
FRENCH POLYNESIA TAHITI
|
||||
GABON 1 H AHEAD OF UTC
|
||||
GAMBIA ON UTC
|
||||
GERMANY ALL 1 H AHEAD OF UTC
|
||||
GERMANY ALL 2 H AHEAD OF UTC MAR 27 - SEP 24
|
||||
GHANA ON UTC
|
||||
GIBRALTAR 1 H AHEAD OF UTC
|
||||
GIBRALTAR 2 H AHEAD OF UTC MAR 27 - SEP 24
|
||||
GREECE 2 H AHEAD OF UTC
|
||||
GREECE 3 H AHEAD OF UTC MAR 27 - SEP 24
|
||||
GREENLAND 4 H BEHIND UTC THULE AIRBASE YEAR ROUND
|
||||
GREENLAND 3 H BEHIND UTC ANGMAGSSALIK AND W. COAST
|
||||
GREENLAND 2 H BEHIND UTC MAR 27 - SEP 24
|
||||
GREENLAND 1 H BEHIND UTC SCORESBYSUND
|
||||
GREENLAND ON UTC MAR 27 - SEP 24
|
||||
GRENADA 4 H BEHIND UTC
|
||||
GUADELOUPE 4 H BEHIND UTC ST. BARTHELEMY, NORTHERN
|
||||
GUADELOUPE ST. MARTIN MARTINIQUE
|
||||
GUAM 10 H AHEAD OF UTC
|
||||
GUATEMALA 6 H BEHIND UTC
|
||||
GUINEA ON UTC
|
||||
GUINEA BISSAU ON UTC
|
||||
GUINEA REPUBLIC ON UTC
|
||||
GUINEA EQUATORIAL 1 H AHEAD OF UTC
|
||||
GUYANA 3 H BEHIND UTC
|
||||
HAITI 5 H BEHIND UTC
|
||||
HAITI 4 H BEHIND UTC APR 3 - OCT 29
|
||||
HOLLAND SEE NETHERLANDS
|
||||
HONDURAS 6 H BEHIND UTC
|
||||
HONG KONG 8 H AHEAD OF UTC
|
||||
HUNGARY 1 H AHEAD OF UTC
|
||||
HUNGARY 2 H AHEAD OF UTC MAR 27 - SEP 24
|
||||
ICELAND ON UTC
|
||||
INDIA 5.5H AHEAD OF UTC INCLUDING ANDAMAN ISLANDS
|
||||
INDONESIA WEST 7 H AHEAD OF UTC SUMATRA, JAVA, BALI,
|
||||
INDONESIA WEST JAKARTA
|
||||
INDONESIA CENTRAL 8 H AHEAD OF UTC KALIMANTAN, SULAWESI
|
||||
INDONESIA EAST 9 H AHEAD OF UTC IRIAN, BARAT
|
||||
IRAN 3.5H AHEAD OF UTC
|
||||
IRAQ 3 H AHEAD OF UTC
|
||||
IRAQ 4 H AHEAD OF UTC APR 1 - SEP 30
|
||||
IRELAND ON UTC
|
||||
IRELAND 1 H AHEAD OF UTC MAR 27 - OCT 22
|
||||
ISRAEL 2 H AHEAD OF UTC
|
||||
ISRAEL 3 H AHEAD OF UTC APR 10 - SEP 3
|
||||
ITALY 1 H AHEAD OF UTC
|
||||
ITALY 2 H AHEAD OF UTC MAR 27 - SEP 24
|
||||
IVORY COAST ON UTC
|
||||
JAMAICA 5 H BEHIND UTC
|
||||
JAPAN 9 H AHEAD OF UTC
|
||||
JOHNSTON ISLAND 10 H BEHIND UTC
|
||||
JORDAN 2 H AHEAD OF UTC
|
||||
JORDAN 3 H AHEAD OF UTC APR 1 - OCT 6
|
||||
KAMPUCHEA 7 H AHEAD OF UTC
|
||||
KENYA 3 H AHEAD OF UTC
|
||||
KIRIBATI, REP OF 12 H AHEAD OF UTC CANTON, ENDERBURY ISLANDS
|
||||
KIRIBATI, REP OF 11 H AHEAD OF UTC CHRISTMAS ISLAND
|
||||
KOREA 9 H AHEAD OF UTC
|
||||
KOREA, REP OF 9 H AHEAD OF UTC
|
||||
KOREA, REP OF 10 H AHEAD OF UTC MAY 8 - OCT 8
|
||||
KUWAIT 3 H AHEAD OF UTC
|
||||
KUSAIE, PINGELAP 12 H AHEAD OF UTC INCLUDING MARSHALL IS.,
|
||||
KUSAIE, PINGELAP EXCLUDING KWAJALEIN)
|
||||
KWAJALEIN 12 H BEHIND UTC
|
||||
LAOS 7 H AHEAD OF UTC
|
||||
LEBANON 2 H AHEAD OF UTC
|
||||
LEBANON 3 H AHEAD OF UTC JUN 1 - OCT 31
|
||||
LEEWARD ISLANDS 4 H BEHIND UTC ANTIGUA, DOMINICA,
|
||||
LEEWARD ISLANDS MONTSERRAT, ST.
|
||||
LEEWARD ISLAANDS CHRISTOPHER, ST. KITTS,
|
||||
LEEWARD ISLANDS NEVIS, ANGUILLA
|
||||
LESOTHO 2 H AHEAD OF UTC
|
||||
LIBERIA ON UTC
|
||||
LIBYAN ARAB 1 H AHEAD OF UTC JAMAHIRIYA/LIBYA
|
||||
LIBYAN ARAB 2 H AHEAD OF UTC APR 1 - SEP 30 JAMAHIRIYA/LIBYA
|
||||
LIECHTENSTEIN 1 H AHEAD OF UTC
|
||||
LIECHTENSTEIN 2 H AHEAD OF UTC MAR 27 - SEP 24
|
||||
LUXEMBOURG 1 H AHEAD OF UTC
|
||||
LUXEMBOURG 2 H AHEAD OF UTC MAR 27 - SEP 24
|
||||
MACAO 8 H AHEAD OF UTC
|
||||
MADAGASCAR 3 H AHEAD OF UTC
|
||||
MADEIRA SEE PORTUGAL
|
||||
MALAWI 2 H AHEAD OF UTC
|
||||
MALAYSIA 8 H AHEAD OF UTC
|
||||
MALDIVES 5 H AHEAD OF UTC
|
||||
MALI ON UTC
|
||||
MALTA 1 H AHEAD OF UTC
|
||||
MALTA 2 H AHEAD OF UTC MAR 27 - SEP 24
|
||||
MARTINIQUE 4 H BEHIND UTC
|
||||
MAURITANIA ON UTC
|
||||
MAURITIUS 4 H AHEAD OF UTC
|
||||
MARIANA ISLANDS 10 H AHEAD OF UTC EXCLUDING GUAM
|
||||
MEXICO BAJA CAL N 7 H BEHIND UTC BAJA CALIFORNIA SUR AND
|
||||
MEXICO BAJA CAL N N. PACIFIC COAST (STATES
|
||||
MEXICO BAJA CAL N OF SINALOA AND SONORA)
|
||||
MEXICO BAJA CAL N 8 H BEHIND UTC ABOVE 28TH PARALLAL APR 3
|
||||
MEXICO BAJA CAL N - OCT 29
|
||||
MEXICO BAJA CAL N 7 H BEHIND UTC ABOVE 28TH PARALLAL APR 3
|
||||
MEXICO BAJA CAL N - 0CT 29
|
||||
MEXICO 6 H BEHIND UTC STATES OF DURANGO,
|
||||
MEXICO COAHUILA, NUEVO LEON,
|
||||
MEXICO TAMAULIPAS
|
||||
MEXICO 5 H BEHIND UTC STATES OF DURANGO,
|
||||
MEXICO COAHUILA, NUEVO LEON,
|
||||
MEXICO TAMAULIPAS APR 3 - OCT 29
|
||||
MEXICO 6 H BEHIND UTC GENERAL MEXICO, STATES OF
|
||||
MEXICO CAMPECHE, QUINTANA ROO AND
|
||||
MEXICO YUCATAN
|
||||
MIDWAY ISLAND 11 H BEHIND UTC
|
||||
MONACO 1 H AHEAD OF UTC
|
||||
MONACO 2 H AHEAD OF UTC MAR 27 - SEP 24
|
||||
MONGOLIA 8 H AHEAD OF UTC
|
||||
MONGOLIA 9 H AHEAD OF UTC MAR 27 - SEP 24
|
||||
MONTSERRAT 4 H BEHIND UTC
|
||||
MOROCCO ON UTC
|
||||
MOZAMBIQUE 2 H AHEAD OF UTC
|
||||
NAMIBIA 2 H AHEAD OF UTC
|
||||
NAURU, REP OF 12 H AHEAD OF UTC
|
||||
NEPAL 5H45M AHEAD OF UTC
|
||||
NETHERLANDS 1 H AHEAD OF UTC
|
||||
NETHERLANDS 2 H AHEAD OF UTC MAR 27 - SEP 24
|
||||
NETHERLANDS 4 H BEHIND UTC ANTILLES AND SOUTHERN ST.
|
||||
NETHERLANDS MAARTEN
|
||||
NEW CALEDONIA 11 H AHEAD OF UTC
|
||||
NEW HEBRIDES SEE VANUATU
|
||||
NEW ZEALAND 12 H AHEAD OF UTC (EXCLUDING CHATHAM ISLAND)
|
||||
NEW ZEALAND 13 H AHEAD OF UTC OCT 30, '88-MAR 4, '89
|
||||
NEW ZEALAND 12H45M AHEAD OF UTC CHATHAM ISLAND
|
||||
NICARAGUA 6 H BEHIND UTC
|
||||
NIGER 1 H AHEAD OF UTC
|
||||
NIGERIA 1 H AHEAD OF UTC
|
||||
NIUE ISLAND 11 H BEHIND UTC
|
||||
NORFOLK ISLAND 11H30M AHEAD OF UTC
|
||||
NORTHERN IRELAND ON UTC WALES, SCOTLAND, N.I.,
|
||||
NORTHERN IRELAND CH.IS.
|
||||
NORTHERN IRELAND 1 H AHEAD OF UTC MAR 27 - OCT 22
|
||||
NORWAY 1 H AHEAD OF UTC
|
||||
NORWAY 2 H AHEAD OF UTC MAR 27 - SEP 24
|
||||
OMAN 4 H AHEAD OF UTC
|
||||
PACIFIC ISLAND T.T.
|
||||
PALAU ISLANDS 9 H AHEAD OF UTC
|
||||
PAKISTAN 5 H AHEAD OF UTC
|
||||
PANAMA 5 H BEHIND UTC
|
||||
PAPUA NEW GUINEA 10 H AHEAD OF UTC INCLUDING BOUGAINVILLE
|
||||
PAPUA NEW GUINEA ISLAND
|
||||
PARAGUAY 4 H BEHIND UTC
|
||||
PARAGUAY 3 H BEHIND UTC OCT 1, '88-MAR 31, '89
|
||||
PERU 5 H BEHIND UTC
|
||||
PHILIPPINES 8 H AHEAD OF UTC
|
||||
PONAPE ISLAND 11 H AHEAD OF UTC
|
||||
POLAND 1 H AHEAD OF UTC
|
||||
POLAND 2 H AHEAD OF UTC MAR 27 - SEP 24
|
||||
PORTUGAL MAINLAND ON UTC
|
||||
PORTUGAL MAINLAND 1 H AHEAD OF UTC MAR 27 - SEP 24
|
||||
PORTUGAL AZORES 1 H BEHIND UTC
|
||||
PORTUGAL AZORES ON UTC MAR 27 - SEP 24
|
||||
PORTUGAL MADEIRA ON UTC
|
||||
PORTUGAL MADEIRA 1 H AHEAD OF UTC MAR 27 - SEP 24
|
||||
PUERTO RICO 4 H BEHIND UTC
|
||||
QATAR 3 H AHEAD OF UTC
|
||||
ROMANIA 2 H AHEAD OF UTC
|
||||
ROMANIA 3 H AHEAD OF UTC MAR 27 - SEP 24
|
||||
RUSSIA SEE USSR
|
||||
RWANDA 2 H AHEAD OF UTC
|
||||
SABA 4 H BEHIND UTC ALSO BONAIRE, CURACAO,
|
||||
SAMOA 11 H BEHIND UTC
|
||||
SAN MARINO 1 H AHEAD OF UTC
|
||||
SAN MARINO 2 H AHEAD OF UTC MAR 27 - SEP 24
|
||||
SAN SALVADOR 6 H BEHIND UTC
|
||||
SAO TOME ISLAND ON UTC AND PRINCIPE ISLAND
|
||||
SAUDI ARABIA 3 H AHEAD OF UTC
|
||||
SCOTLAND SEE ENGLAND
|
||||
SENEGAL ON UTC
|
||||
SEYCHELLES 4 H AHEAD OF UTC
|
||||
SIERRA LEONE ON UTC
|
||||
SINGAPORE 8 H AHEAD OF UTC
|
||||
SOLOMON ISLANDS 11 H AHEAD OF UTC EXCLUDING BOUGAINVILLE
|
||||
SOLOMON ISLANDS ISLAND
|
||||
SOMALI 3 H AHEAD OF UTC
|
||||
SOUTH AFRICA 2 H AHEAD OF UTC
|
||||
SPAIN CANARY IS ON UTC
|
||||
SPAIN CANARY IS 1 H AHEAD OF UTC MAR 27 - SEP 24
|
||||
SPAIN 1 H AHEAD OF UTC CONTINENTAL, BALEARIC AND
|
||||
SPAIN MALLORCA ISLANDS
|
||||
SPAIN 2 H AHEAD OF UTC CONTINENTAL, BALEARIC AND
|
||||
SPAIN MALLORCA ISLANDS MAR 27 -
|
||||
SPAIN SEP 24
|
||||
SPAIN MAINLAND 1 H AHEAD OF UTC MELILLA
|
||||
SPAIN MAINLAND 2 H AHEAD OF UTC MAR 27 - SEP 24
|
||||
SRI LANKA 5H30M AHEAD OF UTC
|
||||
ST. MAARTEN
|
||||
ST. KITTS-NEVIS 4 H BEHIND UTC
|
||||
ST. LUCIA 4 H BEHIND UTC
|
||||
ST. PIERRE 3 H BEHIND UTC INCLUDING MIQUELON
|
||||
ST. PIERRE 2 H BEHIND UTC INLCUDING MIQUELON APR 3
|
||||
ST. PIERRE - OCT 29
|
||||
ST. VINCENT 4 H BEHIND UTC INCLUDING THE GRENADINES
|
||||
ST. HELENA ON UTC
|
||||
SUDAN 2 H AHEAD OF UTC
|
||||
SURINAME 3 H BEHIND UTC
|
||||
SWAZILAND 2 H AHEAD OF UTC
|
||||
SWEDEN 1 H AHEAD OF UTC
|
||||
SWEDEN 2 H AHEAD OF UTC MAR 27 - SEP 24
|
||||
SWITZERLAND 1 H AHEAD OF UTC
|
||||
SWITZERLAND 2 H AHEAD OF UTC MAR 27 - SEP 24
|
||||
SYRIA 2 H AHEAD OF UTC
|
||||
SYRIA 3 H AHEAD OF UTC MAR 15 - OCT 30
|
||||
TAHITI 10 H BEHIND UTC
|
||||
TAIWAN 8 H AHEAD OF UTC
|
||||
TANZANIA 3 H AHEAD OF UTC
|
||||
THAILAND 7 H AHEAD OF UTC
|
||||
TOGO ON UTC
|
||||
TRINIDAD / TOBAGO 4 H BEHIND UTC
|
||||
TUNISIA 1 H AHEAD OF UTC
|
||||
TUNISIA 2 H AHEAD OF UTC APR 10 - SEP 24
|
||||
TURKEY 2 H AHEAD OF UTC
|
||||
TURKEY 3 H AHEAD OF UTC MAR 27 - SEP 24
|
||||
TURKS AND CAICOS 5 H BEHIND UTC
|
||||
TURKS AND CAICOS 4 H BEHIND UTC APR 3 - OCT 29
|
||||
TUVALU 12 H AHEAD OF UTC
|
||||
UGANDA 3 H AHEAD OF UTC
|
||||
UNITED ARAB EMIR. 4 H AHEAD OF UTC ABU DHABI, DUBAI, SHARJAH,
|
||||
UNITED ARAB EMIR RAS AL KHAIMAH
|
||||
UNITED KINGDOM ON UTC WALES, SCOTLAND, N.I., CH.
|
||||
UNITED KINGDOM IS.
|
||||
UNITED KINGDOM 1 H AHEAD OF UTC MAR 27 - OCT 22
|
||||
UNITED STATES SEE USA
|
||||
UPPER VOLTA ON UTC
|
||||
URUGUAY 3 H BEHIND UTC
|
||||
URUGUAY 2 H BEHIND UTC DEC 11, '88-FEB 25, '89
|
||||
URAGUAY (ESTIMATED)
|
||||
USA EASTERN 5 H BEHIND UTC NEW YORK, WASHINGTON
|
||||
USA EASTERN 4 H BEHIND UTC APR 3 - OCT 30
|
||||
USA CENTRAL 6 H BEHIND UTC CHICAGO, HOUSTON
|
||||
USA CENTRAL 5 H BEHIND UTC APR 3 - OCT 30
|
||||
USA MOUNTAIN 7 H BEHIND UTC DENVER
|
||||
USA MOUNTAIN 6 H BEHIND UTC APR 3 - OCT 30
|
||||
USA PACIFIC 8 H BEHIND UTC L.A., SAN FRANCISCO
|
||||
USA PACIFIC 7 H BEHIND UTC APR 3 - OCT 30
|
||||
USA ALASKA STD 9 H BEHIND UTC MOST OF ALASKA (AKST)
|
||||
USA ALASKA STD 8 H BEHIND UTC APR 3 - OCT 30 (AKDT)
|
||||
USA ALEUTIAN 10 H BEHIND UTC ISLANDS WEST OF 170W
|
||||
USA - " - 9 H BEHIND UTC APR 3 - OCT 30
|
||||
USA HAWAII 10 H BEHIND UTC
|
||||
USA BERING 11 H BEHIND UTC SAMOA, MIDWAY
|
||||
USA FOR SPECIFIC INFO ON USA ZONES/TIMES CALL DOT 202-426-4520
|
||||
USSR WEST EUROP 3 H AHEAD OF UTC LENINGRAD, MOSCOW
|
||||
USSR WEST EUROP 4 H AHEAD OF UTC APR 1 - SEP 30
|
||||
USSR CENTRAL EUR 4 H AHEAD OF UTC ROSTOV, BAKU
|
||||
USSR CENTRAL EUR 5 H AHEAD OF UTC APR 1 - SEP 30
|
||||
USSR EAST EUROP 5 H AHEAD OF UTC SVERDLOVSK
|
||||
USSR EAST EUROP 6 H AHEAD OF UTC APR 1 - SEP 30
|
||||
USSR WEST SIBERIAN 6 H AHEAD OF UTC TASHKENT, ALMA ATA
|
||||
USSR WEST SIBERIAN 7 H AHEAD OF UTC APR 1 - SEP 30
|
||||
USSR WEST-CENTRAL 7 H AHEAD OF UTC NOVOSIBIRSK
|
||||
USSR WEST-CENTRAL 8 H AHEAD OF UTC APR 1 - SEP 30
|
||||
USSR WEST-CENTRAL 8 H AHEAD OF UTC IRKUTSK
|
||||
USSR WEST-CENTRAL 9 H AHEAD OF UTC APR 1 - SEP 30
|
||||
USSR CENTRAL SIB 9 H AHEAD OF UTC YAKUTSK
|
||||
USSR CENTRAL SIB 10 H AHEAD OF UTC APR 1 - SEP 30
|
||||
USSR CENTRAL SIB 10 H AHEAD OF UTC VLADIVOSTOK
|
||||
USSR CENTRAL SIB 11 H AHEAD OF UTC APR 1 - SEP 30
|
||||
USSR EAST SIBERIA 11 H AHEAD OF UTC MAGADAN
|
||||
USSR EAST SIBERIA 12 H AHEAD OF UTC APR 1 - SEP 30
|
||||
USSR EAST SIBERIA 12 H AHEAD OF UTC PETROPAVLOVSK
|
||||
USSR EAST SIBERIA 13 H AHEAD OF UTC APR 1 - SEP 30
|
||||
USSR EAST SIBERIA 13 H AHEAD OF UTC UELEN
|
||||
USSR EAST SIBERIA 14 H AHEAD OF UTC APR 1 - SEP 30
|
||||
VANUATU 11 H AHEAD OF UTC (NEW HEBRIDES)
|
||||
VANUATU 12 H AHEAD OF UTC SEP 25, '88-MAR 25, '89
|
||||
VANUATU (ESTIMATED)
|
||||
VATICAN 1 H AHEAD OF UTC
|
||||
VATICAN 2 H AHEAD OF UTC MAR 27 - SEP 24
|
||||
VENEZUELA 4 H BEHIND UTC
|
||||
VIETNAM 7 H AHEAD OF UTC
|
||||
VIRGIN ISLANDS 4 H BEHIND UTC ST.CROIX, ST.THOMAS,
|
||||
VIRGIN ISLANDS ST.JOHN
|
||||
WAKE ISLAND 12 H AHEAD OF UTC
|
||||
WALES SEE ENGLAND
|
||||
WALLIS/FUTUNA IS. 12 H AHEAD OF UTC
|
||||
WINDWARD ISLANDS 4 H BEHIND UTC GRENADA, ST. LUCIA
|
||||
YEMEN 3 H AHEAD OF UTC BOTH REPUBLICS
|
||||
YUGOSLAVIA 1 H AHEAD OF UTC
|
||||
YUGOSLAVIA 2 H AHEAD OF UTC MAR 27 - SEP 24
|
||||
ZAIRE EAST 1 H AHEAD OF UTC KINSHASA MBANDAKA
|
||||
ZAIRE WEST 2 H AHEAD OF UTC LUBUMBASHI, KASAI, KIVU,
|
||||
ZAIRE WEST HAUT-ZAIRE, SHABA
|
||||
ZAMBIA 2 H AHEAD OF UTC
|
||||
ZIMBABWE 2 H AHEAD OF UTC
|
326
usno1995
326
usno1995
@ -1,326 +0,0 @@
|
||||
# @(#)usno1995 8.1
|
||||
#
|
||||
# From Arthur David Olson (1995-12-21):
|
||||
#
|
||||
# Here's time zone information from the United States Naval Observatory
|
||||
# via http://tycho.usno.navy.mil/tzones.html. See USNO's note at the end.
|
||||
World Time Zones
|
||||
For selected countries, the local standard time offset from UTC is given,
|
||||
with daylight savings time where observed.
|
||||
Time: Thu Dec 21 17:43:00 utc 1995
|
||||
Afghanistan: +4.5 hours
|
||||
Albania: +1 hours (Local summer +2 hours)
|
||||
Algeria: +1 hours (Local summer +2 hours)
|
||||
American Samoa: -11 hours
|
||||
Andorra: +1 hours (Local summer +2 hours)
|
||||
Angola: +1 hours
|
||||
Anguilla: -4 hours
|
||||
Antarctica: -2 hours (Local summer -3 hours)
|
||||
Antigua: -4 hours
|
||||
Argentina: -3 hours
|
||||
Argentina western prov: -4 hours
|
||||
Armenia: +4 hours (Local summer +5 hours)
|
||||
Aruba: -4 hours
|
||||
Ascension: 0 hours
|
||||
Australia Northern Territory: +9.5 hours
|
||||
Australia Lord Howe Island: +10.5 hours (Local summer +11 hours)
|
||||
Australia New South Wales: +10 hours (Local summer +11 hours)
|
||||
Australia Queensland: +10 hours
|
||||
Australia Victoria: +10 hours (Local summer +11 hours)
|
||||
Australia Australian Captial Territory: +10 hours (Local summer +11 hours)
|
||||
Australia South: +9.5 hours (Local summer +10.5 hours)
|
||||
Australia Tasmania: +10 hours (Local summer +11 hours)
|
||||
Australia Western: +8 hours
|
||||
Austria: +1 hours (Local summer +2 hours)
|
||||
Azerbajian: +3 hours
|
||||
Azores: -1 hours (Local summer 0 hours)
|
||||
Bahamas: -5 hours (Local summer -4 hours)
|
||||
Bahrain: +3 hours
|
||||
Balearic Islands: +1 hours (Local summer +2 hours)
|
||||
Bangladesh: +6 hours
|
||||
Barbados: -4 hours
|
||||
Belarus: +2 hours (Local summer +3 hours)
|
||||
Belgium: +1 hours (Local summer +2 hours)
|
||||
Belize: -6 hours
|
||||
Benin: +1 hours
|
||||
Bermuda: -4 hours (Local summer -3 hours)
|
||||
Bhutan: +6 hours
|
||||
Bolivia: -4 hours
|
||||
Bonaire: -4 hours
|
||||
Bosnia Hercegovina: +1 hours (Local summer +2 hours)
|
||||
Botswana: +2 hours
|
||||
Brazil Acre: -4 hours (Local summer -5 hours)
|
||||
Brazil Atlantic Islands: -1 hours (Local summer -2 hours)
|
||||
Brazil East: -3 hours (Local summer -1 hours)
|
||||
Brazil West: -4 hours (Local summer -3 hours)
|
||||
British Virgin Islands: -4 hours
|
||||
Brunei: +8 hours
|
||||
Bulgaria: +2 hours (Local summer +3 hours)
|
||||
Burkina Faso: 0 hours
|
||||
Burundi: +2 hours
|
||||
Cambodia: +7 hours
|
||||
Cameroon: +1 hours
|
||||
Canada Central: -6 hours (Local summer -5 hours)
|
||||
Canada Eastern: -5 hours (Local summer -4 hours)
|
||||
Canada Mountain: -7 hours (Local summer -6 hours)
|
||||
Canada Yukon & Pacific: -8 hours (Local summer -7 hours)
|
||||
Canada Atlantic: -4 hours (Local summer -3 hours)
|
||||
Canada Newfoundland: -3.5 hours (Local summer -2.5 hours)
|
||||
Canary Islands: 0 hours (Local summer +1 hours)
|
||||
Canton Enderbury Islands: -11 hours
|
||||
Cape Verde: -1 hours
|
||||
Caroline Island: +11 hours
|
||||
Cayman Islands: -5 hours
|
||||
Central African Rep: +1 hours
|
||||
Chad: +1 hours
|
||||
Channel Islands: 0 hours (Local summer +1 hours)
|
||||
Chatham Island: +12.75 hours (Local summer +13.75 hours)
|
||||
Chile: -4 hours (Local summer -3 hours)
|
||||
China People's Rep: +8 hours
|
||||
Christmas Islands: -10 hours
|
||||
Cocos (Keeling) Islands: ( hours (Local summer ) hours)
|
||||
Colombia: -5 hours
|
||||
Congo: +1 hours
|
||||
Cook Islands: -10 hours
|
||||
Costa Rica: -6 hours
|
||||
Cote d'Ivoire: 0 hours
|
||||
Croatia: +1 hours (Local summer +2 hours)
|
||||
Cuba: -5 hours (Local summer -4 hours)
|
||||
Curacao: -4 hours
|
||||
Cyprus: +2 hours (Local summer +3 hours)
|
||||
Czech Republic: +1 hours (Local summer +2 hours)
|
||||
Dahomey: +1 hours
|
||||
Denmark: +1 hours (Local summer +2 hours)
|
||||
Djibouti: +3 hours
|
||||
Dominica: -4 hours
|
||||
Dominican Republic: -4 hours
|
||||
Easter Island: -6 hours (Local summer -5 hours)
|
||||
Ecuador: -5 hours
|
||||
Egypt: +2 hours (Local summer +3 hours)
|
||||
El Salvador: -6 hours
|
||||
England: 0 hours (Local summer +1 hours)
|
||||
Equitorial Guinea: +1 hours
|
||||
Eritrea: +3 hours
|
||||
Estonia: +2 hours (Local summer +3 hours)
|
||||
Ethiopia: +3 hours
|
||||
Falkland Islands: -4 hours (Local summer -3 hours)
|
||||
Faroe Island: 0 hours (Local summer +1 hours)
|
||||
Fiji: +12 hours
|
||||
Finland: +2 hours (Local summer +3 hours)
|
||||
France: +1 hours (Local summer +2 hours)
|
||||
French Guiana: -3 hours
|
||||
French Polynesia: -10 hours
|
||||
Gabon: +1 hours
|
||||
Galapagos Islands: -6 hours
|
||||
Gambia: 0 hours
|
||||
Gambier Island: -9 hours
|
||||
Georgia: +4 hours
|
||||
Germany: +1 hours (Local summer +2 hours)
|
||||
Ghana: 0 hours
|
||||
Gibraltar: +1 hours (Local summer +2 hours)
|
||||
Greece: +2 hours (Local summer +3 hours)
|
||||
Greenland: -3 hours (Local summer -2 hours)
|
||||
Greenland Thule: -4 hours (Local summer -3 hours)
|
||||
Greenland Scoresbysun: -1 hours (Local summer 0 hours)
|
||||
Grenada: -4 hours
|
||||
Grenadines: -4 hours
|
||||
Guadeloupe: -4 hours
|
||||
Guam: +10 hours
|
||||
Guatemala: -6 hours
|
||||
Guinea: 0 hours
|
||||
Guinea Bissau: - hours (Local summer 0 hours)
|
||||
Guyana: -3 hours
|
||||
Haiti: -5 hours (Local summer -4 hours)
|
||||
Honduras: -6 hours
|
||||
Hong kong: +8 hours
|
||||
Hungary: +1 hours (Local summer +2 hours)
|
||||
Iceland: 0 hours
|
||||
India: +5.5 hours
|
||||
Indonesia Central: +8 hours
|
||||
Indonesia East: +9 hours
|
||||
Indonesia West: +7 hours
|
||||
Iran: +3.5 hours
|
||||
Iraq: +3 hours (Local summer +4 hours)
|
||||
Ireland Republic of: 0 hours (Local summer +1 hours)
|
||||
Israel: +2 hours (Local summer +3 hours)
|
||||
Italy: +1 hours (Local summer +2 hours)
|
||||
Jamaica: -5 hours
|
||||
Japan: +9 hours
|
||||
Johnston Island: -10 hours
|
||||
Jordan: +2 hours (Local summer +3 hours)
|
||||
Kazakhstan: +6 hours (Local summer +7 hours)
|
||||
Kenya: +3 hours
|
||||
Kiribati: +12 hours
|
||||
Korea Dem Republic of: +9 hours
|
||||
Korea Republic of: +9 hours
|
||||
Kusaie: +12 hours
|
||||
Kuwait: +3 hours
|
||||
Kwajalein: -12 hours
|
||||
Kyrgyzstan: +5 hours (Local summer +6 hours)
|
||||
Laos: +7 hours
|
||||
Latvia: +2 hours (Local summer +3 hours)
|
||||
Lebanon: +2 hours (Local summer +3 hours)
|
||||
Leeward Islands: -4 hours
|
||||
Lesotho: +2 hours
|
||||
Liberia: 0 hours
|
||||
Libya: +2 hours
|
||||
Lithuania: +2 hours (Local summer +3 hours)
|
||||
Luxembourg: +1 hours (Local summer +2 hours)
|
||||
Macedonia: +1 hours (Local summer +2 hours)
|
||||
Madagascar: +3 hours
|
||||
Madeira: 0 hours (Local summer +1 hours)
|
||||
Malawi: +2 hours
|
||||
Malaysia: +8 hours
|
||||
Maldives: +5 hours
|
||||
Mali: 0 hours
|
||||
Mallorca Islands: +1 hours (Local summer +2 hours)
|
||||
Malta: +1 hours (Local summer +2 hours)
|
||||
Mariana Island: +10 hours
|
||||
Marquesas Islands: -9.5 hours
|
||||
Marshall Islands: +12 hours
|
||||
Martinique: -4 hours
|
||||
Mauritania: 0 hours
|
||||
Mauritius: +4 hours
|
||||
Mayotte: +3 hours
|
||||
Melilla: +1 hours (Local summer +2 hours)
|
||||
Mexico: -6 hours
|
||||
Mexico Baja Calif Norte: -8 hours (Local summer -7 hours)
|
||||
Mexico Nayarit: -7 hours
|
||||
Mexico Sinaloa: -7 hours
|
||||
Mexico Sonora: -7 hours
|
||||
Midway Island: -11 hours
|
||||
Moldova: +2 hours (Local summer +3 hours)
|
||||
Moldovian Rep Pridnestrovye: +2 hours (Local summer +3 hours)
|
||||
Monaco: +1 hours (Local summer +2 hours)
|
||||
Mongolia: +8 hours
|
||||
Morocco: 0 hours
|
||||
Mozambique: +2 hours
|
||||
Myanmar: +6.5 hours
|
||||
Namibia: +1 hours (Local summer +2 hours)
|
||||
Nauru Republic of: +12 hours
|
||||
Nepal: +5.75 hours
|
||||
Netherlands: +1 hours (Local summer +2 hours)
|
||||
Netherlands Antilles: -4 hours
|
||||
Nevis Montserrat: -4 hours
|
||||
New Caledonia: +11 hours
|
||||
New Hebrides: +11 hours
|
||||
New Zealand: +12 hours (Local summer +13 hours)
|
||||
Nicaragua: -6 hours (Local summer -5 hours)
|
||||
Niger: +1 hours
|
||||
Nigeria: +1 hours
|
||||
Niue Island: -11 hours
|
||||
Norfolk Island: +11.5 hours
|
||||
Northern Ireland: 0 hours (Local summer +1 hours)
|
||||
Northern Mariana Islands: +10 hours
|
||||
Norway: +1 hours (Local summer +2 hours)
|
||||
Oman: +4 hours
|
||||
Pakistan: +5 hours
|
||||
Palau: +9 hours
|
||||
Panama: -5 hours
|
||||
Papua New Guinea: +10 hours
|
||||
Paraguay: -4 hours (Local summer -3 hours)
|
||||
Peru: -5 hours
|
||||
Philippines: +8 hours
|
||||
Pingelap: +12 hours
|
||||
Poland: +1 hours (Local summer +2 hours)
|
||||
Ponape Island: +11 hours
|
||||
Portugal: +1 hours (Local summer +2 hours)
|
||||
Principe Island: 0 hours
|
||||
Puerto Rico: -4 hours
|
||||
Qatar: +3 hours
|
||||
Reunion: +4 hours
|
||||
Romania: +2 hours (Local summer +3 hours)
|
||||
Russian Federation zone eight: +9 hours (Local summer +10 hours)
|
||||
Russian Federation zone eleven: +12 hours (Local summer +13 hours)
|
||||
Russian Federation zone five: +6 hours (Local summer +7 hours)
|
||||
Russian Federation zone four: +5 hours (Local summer +6 hours)
|
||||
Russian Federation zone nine: +10 hours (Local summer +11 hours)
|
||||
Russian Federation zone one: +2 hours (Local summer +3 hours)
|
||||
Russian Federation zone seven: +8 hours (Local summer +9 hours)
|
||||
Russian Federation zone six: +7 hours (Local summer +8 hours)
|
||||
Russian Federation zone ten: +11 hours (Local summer +12 hours)
|
||||
Russian Federation zone three: +4 hours (Local summer +5 hours)
|
||||
Russian Federation zone two: +4 hours (Local summer +5 hours)
|
||||
Rwanda: +2 hours
|
||||
Saba: -4 hours
|
||||
Samoa: -11 hours
|
||||
San Marino: +1 hours (Local summer +2 hours)
|
||||
Sao Tome e Principe: 0 hours
|
||||
Saudi Arabia: +3 hours
|
||||
Scotland: 0 hours
|
||||
Senegal: 0 hours
|
||||
Seychelles: +4 hours
|
||||
Sierra Leone: 0 hours
|
||||
Singapore: +8 hours
|
||||
Slovakia: +1 hours (Local summer +2 hours)
|
||||
Slovenia: +1 hours (Local summer +2 hours)
|
||||
Society Island: -10 hours
|
||||
Solomon Islands: +11 hours
|
||||
Somalia: +3 hours
|
||||
South Africa: +2 hours
|
||||
Spain: +1 hours (Local summer +2 hours)
|
||||
Sri Lanka: +5.5 hours
|
||||
St Christopher: -4 hours
|
||||
St Croix: -4 hours
|
||||
St Helena: 0 hours
|
||||
St John: -4 hours
|
||||
St Kitts Nevis: -4 hours
|
||||
St Lucia: -4 hours
|
||||
St Maarten: -4 hours
|
||||
St Pierre & Miquelon: -3 hours (Local summer -2 hours)
|
||||
St Thomas: -4 hours
|
||||
St Vincent: -4 hours
|
||||
Sudan: +2 hours
|
||||
Suriname: -3 hours
|
||||
Swaziland: +2 hours
|
||||
Sweden: +1 hours (Local summer +2 hours)
|
||||
Switzerland: +1 hours (Local summer +2 hours)
|
||||
Syria: +2 hours (Local summer +3 hours)
|
||||
Tahiti: -10 hours
|
||||
Taiwan: +8 hours
|
||||
Tajikistan: +6 hours
|
||||
Tanzania: +3 hours
|
||||
Thailand: +7 hours
|
||||
Togo: 0 hours
|
||||
Tonga: +13 hours
|
||||
Trinidad and Tobago: -4 hours
|
||||
Tuamotu Island: -10 hours
|
||||
Tubuai Island: -10 hours
|
||||
Tunisia: +1 hours
|
||||
Turkey: +2 hours (Local summer +3 hours)
|
||||
Turkmenistan: +5 hours
|
||||
Turks and Caicos Islands: -5 hours (Local summer -4 hours)
|
||||
Tuvalu: +12 hours
|
||||
Uganda: +3 hours
|
||||
Ukraine: +2 hours (Local summer +3 hours)
|
||||
United Arab Emirates: +4 hours
|
||||
United Kingdom: 0 hours (Local summer +1 hours)
|
||||
USA Central: -6 hours (Local summer -5 hours)
|
||||
USA Eastern: -5 hours (Local summer -4 hours)
|
||||
USA Mountain: -7 hours (Local summer -6 hours)
|
||||
USA Arizona: -7 hours
|
||||
USA Indiana East: -5 hours
|
||||
USA Pacific: -8 hours (Local summer -7 hours)
|
||||
USA Alaska: -9 hours (Local summer -8 hours)
|
||||
USA Hawaii Aleutian: - hours (Local summer -10 hours)
|
||||
Uruguay: -3 hours
|
||||
Uzbekistan: +5 hours
|
||||
Vanuatu: +11 hours (Local summer +12 hours)
|
||||
Vatican City: +1 hours (Local summer +2 hours)
|
||||
Venezuela: -4 hours
|
||||
Vietnam: +7 hours
|
||||
Virgin Islands: -4 hours
|
||||
Wake Island: +12 hours
|
||||
Wales: 0 hours (Local summer +1 hours)
|
||||
Wallis and Futuna Islands: +12 hours
|
||||
Windward Islands: -4 hours
|
||||
Yemen: +3 hours
|
||||
Yugoslavia: +1 hours (Local summer +2 hours)
|
||||
Zaire Kasai: +2 hours
|
||||
Zaire Kinshasa Mbandaka: +1 hours
|
||||
Zaire Haut Zaire: +2 hours
|
||||
Zaire Kivu: +2 hours
|
||||
Zaire Shaba: +2 hours
|
||||
Zambia: +2 hours
|
||||
Zimbabwe: +2 hours
|
||||
All timezone information is non-authoritative...
|
327
usno1997
327
usno1997
@ -1,327 +0,0 @@
|
||||
# @(#)usno1997 8.1
|
||||
#
|
||||
# From Arthur David Olson (1997-03-07):
|
||||
#
|
||||
# Here's time zone information from the United States Naval Observatory
|
||||
# via http://tycho.usno.navy.mil/tzones.html. See USNO's note at the end.
|
||||
Unofficial Time Zone Information
|
||||
World Time Zones
|
||||
For selected countries, the local standard time offset from UTC is given, with daylight savings time where observed.
|
||||
Time: Fri Mar 7 22:38:58 UTC 1997
|
||||
Afghanistan: +4.5 hours
|
||||
Albania: +1 hours (Local summer +2 hours)
|
||||
Algeria: +1 hours (Local summer +2 hours)
|
||||
American Samoa: -11 hours
|
||||
Andorra: +1 hours (Local summer +2 hours)
|
||||
Angola: +1 hours
|
||||
Anguilla: -4 hours
|
||||
Antarctica: -2 hours (Local summer -3 hours)
|
||||
Antigua: -4 hours
|
||||
Argentina: -3 hours
|
||||
Argentina western prov: -4 hours
|
||||
Armenia: +4 hours (Local summer +5 hours)
|
||||
Aruba: -4 hours
|
||||
Ascension: 0 hours
|
||||
Australia Northern Territory: +9.5 hours
|
||||
Australia Lord Howe Island: +10.5 hours (Local summer +11 hours)
|
||||
Australia New South Wales: +10 hours (Local summer +11 hours)
|
||||
Australia Queensland: +10 hours
|
||||
Australia Victoria: +10 hours (Local summer +11 hours)
|
||||
Australia Australian Captial Territory: +10 hours (Local summer +11 hours)
|
||||
Australia South: +9.5 hours (Local summer +10.5 hours)
|
||||
Australia Tasmania: +10 hours (Local summer +11 hours)
|
||||
Australia Western: +8 hours
|
||||
Austria: +1 hours (Local summer +2 hours)
|
||||
Azerbajian: +3 hours
|
||||
Azores: -1 hours (Local summer 0 hours)
|
||||
Bahamas: -5 hours (Local summer -4 hours)
|
||||
Bahrain: +3 hours
|
||||
Balearic Islands: +1 hours (Local summer +2 hours)
|
||||
Bangladesh: +6 hours
|
||||
Barbados: -4 hours
|
||||
Belarus: +2 hours (Local summer +3 hours)
|
||||
Belgium: +1 hours (Local summer +2 hours)
|
||||
Belize: -6 hours
|
||||
Benin: +1 hours
|
||||
Bermuda: -4 hours (Local summer -3 hours)
|
||||
Bhutan: +6 hours
|
||||
Bolivia: -4 hours
|
||||
Bonaire: -4 hours
|
||||
Bosnia Hercegovina: +1 hours (Local summer +2 hours)
|
||||
Botswana: +2 hours
|
||||
Brazil Acre: -4 hours (Local summer -5 hours)
|
||||
Brazil Atlantic Islands: -1 hours (Local summer -2 hours)
|
||||
Brazil East: -3 hours (Local summer -1 hours)
|
||||
Brazil West: -4 hours (Local summer -3 hours)
|
||||
British Virgin Islands: -4 hours
|
||||
Brunei: +8 hours
|
||||
Bulgaria: +2 hours (Local summer +3 hours)
|
||||
Burkina Faso: 0 hours
|
||||
Burundi: +2 hours
|
||||
Cambodia: +7 hours
|
||||
Cameroon: +1 hours
|
||||
Canada Central: -6 hours (Local summer -5 hours)
|
||||
Canada Eastern: -5 hours (Local summer -4 hours)
|
||||
Canada Mountain: -7 hours (Local summer -6 hours)
|
||||
Canada Yukon & Pacific: -8 hours (Local summer -7 hours)
|
||||
Canada Atlantic: -4 hours (Local summer -3 hours)
|
||||
Canada Newfoundland: -3.5 hours (Local summer -2.5 hours)
|
||||
Canary Islands: 0 hours (Local summer +1 hours)
|
||||
Canton Enderbury Islands: -11 hours
|
||||
Cape Verde: -1 hours
|
||||
Caroline Island: +11 hours
|
||||
Cayman Islands: -5 hours
|
||||
Central African Rep: +1 hours
|
||||
Chad: +1 hours
|
||||
Channel Islands: 0 hours (Local summer +1 hours)
|
||||
Chatham Island: +12.75 hours (Local summer +13.75 hours)
|
||||
Chile: -4 hours (Local summer -3 hours)
|
||||
China People's Rep: +8 hours
|
||||
Christmas Islands: -10 hours
|
||||
Cocos (Keeling) Islands: ( hours (Local summer ) hours)
|
||||
Colombia: -5 hours
|
||||
Congo: +1 hours
|
||||
Cook Islands: -10 hours
|
||||
Costa Rica: -6 hours
|
||||
Cote d'Ivoire: 0 hours
|
||||
Croatia: +1 hours (Local summer +2 hours)
|
||||
Cuba: -5 hours (Local summer -4 hours)
|
||||
Curacao: -4 hours
|
||||
Cyprus: +2 hours (Local summer +3 hours)
|
||||
Czech Republic: +1 hours (Local summer +2 hours)
|
||||
Dahomey: +1 hours
|
||||
Denmark: +1 hours (Local summer +2 hours)
|
||||
Djibouti: +3 hours
|
||||
Dominica: -4 hours
|
||||
Dominican Republic: -4 hours
|
||||
Easter Island: -6 hours (Local summer -5 hours)
|
||||
Ecuador: -5 hours
|
||||
Egypt: +2 hours (Local summer +3 hours)
|
||||
El Salvador: -6 hours
|
||||
England: 0 hours (Local summer +1 hours)
|
||||
Equitorial Guinea: +1 hours
|
||||
Eritrea: +3 hours
|
||||
Estonia: +2 hours (Local summer +3 hours)
|
||||
Ethiopia: +3 hours
|
||||
Falkland Islands: -4 hours (Local summer -3 hours)
|
||||
Faroe Island: 0 hours (Local summer +1 hours)
|
||||
Fiji: +12 hours
|
||||
Finland: +2 hours (Local summer +3 hours)
|
||||
France: +1 hours (Local summer +2 hours)
|
||||
French Guiana: -3 hours
|
||||
French Polynesia: -10 hours
|
||||
Gabon: +1 hours
|
||||
Galapagos Islands: -5 hours
|
||||
Gambia: 0 hours
|
||||
Gambier Island: -9 hours
|
||||
Georgia: +4 hours
|
||||
Germany: +1 hours (Local summer +2 hours)
|
||||
Ghana: 0 hours
|
||||
Gibraltar: +1 hours (Local summer +2 hours)
|
||||
Greece: +2 hours (Local summer +3 hours)
|
||||
Greenland: -3 hours (Local summer -2 hours)
|
||||
Greenland Thule: -4 hours (Local summer -3 hours)
|
||||
Greenland Scoresbysun: -1 hours (Local summer 0 hours)
|
||||
Grenada: -4 hours
|
||||
Grenadines: -4 hours
|
||||
Guadeloupe: -4 hours
|
||||
Guam: +10 hours
|
||||
Guatemala: -6 hours
|
||||
Guinea: 0 hours
|
||||
Guinea Bissau: - hours (Local summer 0 hours)
|
||||
Guyana: -3 hours
|
||||
Haiti: -5 hours (Local summer -4 hours)
|
||||
Honduras: -6 hours
|
||||
Hong kong: +8 hours
|
||||
Hungary: +1 hours (Local summer +2 hours)
|
||||
Iceland: 0 hours
|
||||
India: +5.5 hours
|
||||
Indonesia Central: +8 hours
|
||||
Indonesia East: +9 hours
|
||||
Indonesia West: +7 hours
|
||||
Iran: +3.5 hours
|
||||
Iraq: +3 hours (Local summer +4 hours)
|
||||
Ireland Republic of: 0 hours (Local summer +1 hours)
|
||||
Israel: +2 hours (Local summer +3 hours)
|
||||
Italy: +1 hours (Local summer +2 hours)
|
||||
Jamaica: -5 hours
|
||||
Japan: +9 hours
|
||||
Johnston Island: -10 hours
|
||||
Jordan: +2 hours (Local summer +3 hours)
|
||||
Kazakhstan: +6 hours (Local summer +7 hours)
|
||||
Kenya: +3 hours
|
||||
Kiribati: +12 hours
|
||||
Korea Dem Republic of: +9 hours
|
||||
Korea Republic of: +9 hours
|
||||
Kusaie: +12 hours
|
||||
Kuwait: +3 hours
|
||||
Kwajalein: -12 hours
|
||||
Kyrgyzstan: +5 hours (Local summer +6 hours)
|
||||
Laos: +7 hours
|
||||
Latvia: +2 hours (Local summer +3 hours)
|
||||
Lebanon: +2 hours (Local summer +3 hours)
|
||||
Leeward Islands: -4 hours
|
||||
Lesotho: +2 hours
|
||||
Liberia: 0 hours
|
||||
Libya: +2 hours
|
||||
Lithuania: +2 hours (Local summer +3 hours)
|
||||
Luxembourg: +1 hours (Local summer +2 hours)
|
||||
Macedonia: +1 hours (Local summer +2 hours)
|
||||
Madagascar: +3 hours
|
||||
Madeira: 0 hours (Local summer +1 hours)
|
||||
Malawi: +2 hours
|
||||
Malaysia: +8 hours
|
||||
Maldives: +5 hours
|
||||
Mali: 0 hours
|
||||
Mallorca Islands: +1 hours (Local summer +2 hours)
|
||||
Malta: +1 hours (Local summer +2 hours)
|
||||
Mariana Island: +10 hours
|
||||
Marquesas Islands: -9.5 hours
|
||||
Marshall Islands: +12 hours
|
||||
Martinique: -4 hours
|
||||
Mauritania: 0 hours
|
||||
Mauritius: +4 hours
|
||||
Mayotte: +3 hours
|
||||
Melilla: +1 hours (Local summer +2 hours)
|
||||
Mexico: -6 hours
|
||||
Mexico Baja Calif Norte: -8 hours (Local summer -7 hours)
|
||||
Mexico Nayarit: -7 hours
|
||||
Mexico Sinaloa: -7 hours
|
||||
Mexico Sonora: -7 hours
|
||||
Midway Island: -11 hours
|
||||
Moldova: +2 hours (Local summer +3 hours)
|
||||
Moldovian Rep Pridnestrovye: +2 hours (Local summer +3 hours)
|
||||
Monaco: +1 hours (Local summer +2 hours)
|
||||
Mongolia: +8 hours
|
||||
Morocco: 0 hours
|
||||
Mozambique: +2 hours
|
||||
Myanmar: +6.5 hours
|
||||
Namibia: +1 hours (Local summer +2 hours)
|
||||
Nauru Republic of: +12 hours
|
||||
Nepal: +5.75 hours
|
||||
Netherlands: +1 hours (Local summer +2 hours)
|
||||
Netherlands Antilles: -4 hours
|
||||
Nevis Montserrat: -4 hours
|
||||
New Caledonia: +11 hours
|
||||
New Hebrides: +11 hours
|
||||
New Zealand: +12 hours (Local summer +13 hours)
|
||||
Nicaragua: -6 hours (Local summer -5 hours)
|
||||
Niger: +1 hours
|
||||
Nigeria: +1 hours
|
||||
Niue Island: -11 hours
|
||||
Norfolk Island: +11.5 hours
|
||||
Northern Ireland: 0 hours (Local summer +1 hours)
|
||||
Northern Mariana Islands: +10 hours
|
||||
Norway: +1 hours (Local summer +2 hours)
|
||||
Oman: +4 hours
|
||||
Pakistan: +5 hours
|
||||
Palau: +9 hours
|
||||
Panama: -5 hours
|
||||
Papua New Guinea: +10 hours
|
||||
Paraguay: -4 hours (Local summer -3 hours)
|
||||
Peru: -5 hours
|
||||
Philippines: +8 hours
|
||||
Pingelap: +12 hours
|
||||
Poland: +1 hours (Local summer +2 hours)
|
||||
Ponape Island: +11 hours
|
||||
Portugal: +1 hours (Local summer +2 hours)
|
||||
Principe Island: 0 hours
|
||||
Puerto Rico: -4 hours
|
||||
Qatar: +3 hours
|
||||
Reunion: +4 hours
|
||||
Romania: +2 hours (Local summer +3 hours)
|
||||
Russian Federation zone eight: +9 hours (Local summer +10 hours)
|
||||
Russian Federation zone eleven: +12 hours (Local summer +13 hours)
|
||||
Russian Federation zone five: +6 hours (Local summer +7 hours)
|
||||
Russian Federation zone four: +5 hours (Local summer +6 hours)
|
||||
Russian Federation zone nine: +10 hours (Local summer +11 hours)
|
||||
Russian Federation zone one: +2 hours (Local summer +3 hours)
|
||||
Russian Federation zone seven: +8 hours (Local summer +9 hours)
|
||||
Russian Federation zone six: +7 hours (Local summer +8 hours)
|
||||
Russian Federation zone ten: +11 hours (Local summer +12 hours)
|
||||
Russian Federation zone three: +4 hours (Local summer +5 hours)
|
||||
Russian Federation zone two: +4 hours (Local summer +5 hours)
|
||||
Rwanda: +2 hours
|
||||
Saba: -4 hours
|
||||
Samoa: -11 hours
|
||||
San Marino: +1 hours (Local summer +2 hours)
|
||||
Sao Tome e Principe: 0 hours
|
||||
Saudi Arabia: +3 hours
|
||||
Scotland: 0 hours (Local summer +1 hours)
|
||||
Senegal: 0 hours
|
||||
Seychelles: +4 hours
|
||||
Sierra Leone: 0 hours
|
||||
Singapore: +8 hours
|
||||
Slovakia: +1 hours (Local summer +2 hours)
|
||||
Slovenia: +1 hours (Local summer +2 hours)
|
||||
Society Island: -10 hours
|
||||
Solomon Islands: +11 hours
|
||||
Somalia: +3 hours
|
||||
South Africa: +2 hours
|
||||
Spain: +1 hours (Local summer +2 hours)
|
||||
Sri Lanka: +5.5 hours
|
||||
St Christopher: -4 hours
|
||||
St Croix: -4 hours
|
||||
St Helena: 0 hours
|
||||
St John: -4 hours
|
||||
St Kitts Nevis: -4 hours
|
||||
St Lucia: -4 hours
|
||||
St Maarten: -4 hours
|
||||
St Pierre & Miquelon: -3 hours (Local summer -2 hours)
|
||||
St Thomas: -4 hours
|
||||
St Vincent: -4 hours
|
||||
Sudan: +2 hours
|
||||
Suriname: -3 hours
|
||||
Swaziland: +2 hours
|
||||
Sweden: +1 hours (Local summer +2 hours)
|
||||
Switzerland: +1 hours (Local summer +2 hours)
|
||||
Syria: +2 hours (Local summer +3 hours)
|
||||
Tahiti: -10 hours
|
||||
Taiwan: +8 hours
|
||||
Tajikistan: +6 hours
|
||||
Tanzania: +3 hours
|
||||
Thailand: +7 hours
|
||||
Togo: 0 hours
|
||||
Tonga: +13 hours
|
||||
Trinidad and Tobago: -4 hours
|
||||
Tuamotu Island: -10 hours
|
||||
Tubuai Island: -10 hours
|
||||
Tunisia: +1 hours
|
||||
Turkey: +2 hours (Local summer +3 hours)
|
||||
Turkmenistan: +5 hours
|
||||
Turks and Caicos Islands: -5 hours (Local summer -4 hours)
|
||||
Tuvalu: +12 hours
|
||||
Uganda: +3 hours
|
||||
Ukraine: +2 hours (Local summer +3 hours)
|
||||
United Arab Emirates: +4 hours
|
||||
United Kingdom: 0 hours (Local summer +1 hours)
|
||||
USA Central: -6 hours (Local summer -5 hours)
|
||||
USA Eastern: -5 hours (Local summer -4 hours)
|
||||
USA Mountain: -7 hours (Local summer -6 hours)
|
||||
USA Arizona: -7 hours
|
||||
USA Indiana East: -5 hours
|
||||
USA Pacific: -8 hours (Local summer -7 hours)
|
||||
USA Alaska: -9 hours (Local summer -8 hours)
|
||||
USA Aleutian: -10 hours
|
||||
USA Hawaii: -10 hours
|
||||
Uruguay: -3 hours
|
||||
Uzbekistan: +5 hours
|
||||
Vanuatu: +11 hours (Local summer +12 hours)
|
||||
Vatican City: +1 hours (Local summer +2 hours)
|
||||
Venezuela: -4 hours
|
||||
Vietnam: +7 hours
|
||||
Virgin Islands: -4 hours
|
||||
Wake Island: +12 hours
|
||||
Wales: 0 hours (Local summer +1 hours)
|
||||
Wallis and Futuna Islands: +12 hours
|
||||
Windward Islands: -4 hours
|
||||
Yemen: +3 hours
|
||||
Yugoslavia: +1 hours (Local summer +2 hours)
|
||||
Zaire Kasai: +2 hours
|
||||
Zaire Kinshasa Mbandaka: +1 hours
|
||||
Zaire Haut Zaire: +2 hours
|
||||
Zaire Kivu: +2 hours
|
||||
Zaire Shaba: +2 hours
|
||||
Zambia: +2 hours
|
||||
Zimbabwe: +2 hours
|
||||
All timezone information is non-authoritative...
|
327
usno1998
327
usno1998
@ -1,327 +0,0 @@
|
||||
# @(#)usno1998 8.1
|
||||
#
|
||||
# From Arthur David Olson (1998-05-26):
|
||||
#
|
||||
# Here's time zone information from the United States Naval Observatory
|
||||
# via http://tycho.usno.navy.mil/tzones.html. See USNO's note at the end.
|
||||
Unofficial Time Zone Information
|
||||
World Time Zones
|
||||
For selected countries, the local standard time offset from UTC is given, with daylight savings time where observed.
|
||||
Time: Mon May 25 21:14:24 UTC 1998
|
||||
Afghanistan: +4.5 hours
|
||||
Albania: +1 hours (Local summer +2 hours)
|
||||
Algeria: +1 hours (Local summer +2 hours)
|
||||
American Samoa: -11 hours
|
||||
Andorra: +1 hours (Local summer +2 hours)
|
||||
Angola: +1 hours
|
||||
Anguilla: -4 hours
|
||||
Antarctica: -2 hours (Local summer -3 hours)
|
||||
Antigua: -4 hours
|
||||
Argentina: -3 hours
|
||||
Argentina western prov: -4 hours
|
||||
Armenia: +4 hours (Local summer +5 hours)
|
||||
Aruba: -4 hours
|
||||
Ascension: 0 hours
|
||||
Australia Northern Territory: +9.5 hours
|
||||
Australia Lord Howe Island: +10.5 hours (Local summer +11 hours)
|
||||
Australia New South Wales: +10 hours (Local summer +11 hours)
|
||||
Australia Queensland: +10 hours
|
||||
Australia Victoria: +10 hours (Local summer +11 hours)
|
||||
Australia Australian Captial Territory: +10 hours (Local summer +11 hours)
|
||||
Australia South: +9.5 hours (Local summer +10.5 hours)
|
||||
Australia Tasmania: +10 hours (Local summer +11 hours)
|
||||
Australia Western: +8 hours
|
||||
Austria: +1 hours (Local summer +2 hours)
|
||||
Azerbajian: +3 hours
|
||||
Azores: -1 hours (Local summer 0 hours)
|
||||
Bahamas: -5 hours (Local summer -4 hours)
|
||||
Bahrain: +3 hours
|
||||
Balearic Islands: +1 hours (Local summer +2 hours)
|
||||
Bangladesh: +6 hours
|
||||
Barbados: -4 hours
|
||||
Belarus: +2 hours (Local summer +3 hours)
|
||||
Belgium: +1 hours (Local summer +2 hours)
|
||||
Belize: -6 hours
|
||||
Benin: +1 hours
|
||||
Bermuda: -4 hours (Local summer -3 hours)
|
||||
Bhutan: +6 hours
|
||||
Bolivia: -4 hours
|
||||
Bonaire: -4 hours
|
||||
Bosnia Hercegovina: +1 hours (Local summer +2 hours)
|
||||
Botswana: +2 hours
|
||||
Brazil Acre: -4 hours (Local summer -5 hours)
|
||||
Brazil Atlantic Islands: -1 hours (Local summer -2 hours)
|
||||
Brazil East: -3 hours (Local summer -1 hours)
|
||||
Brazil West: -4 hours (Local summer -3 hours)
|
||||
British Virgin Islands: -4 hours
|
||||
Brunei: +8 hours
|
||||
Bulgaria: +2 hours (Local summer +3 hours)
|
||||
Burkina Faso: 0 hours
|
||||
Burundi: +2 hours
|
||||
Cambodia: +7 hours
|
||||
Cameroon: +1 hours
|
||||
Canada Central: -6 hours (Local summer -5 hours)
|
||||
Canada Eastern: -5 hours (Local summer -4 hours)
|
||||
Canada Mountain: -7 hours (Local summer -6 hours)
|
||||
Canada Yukon & Pacific: -8 hours (Local summer -7 hours)
|
||||
Canada Atlantic: -4 hours (Local summer -3 hours)
|
||||
Canada Newfoundland: -3.5 hours (Local summer -2.5 hours)
|
||||
Canary Islands: 0 hours (Local summer +1 hours)
|
||||
Canton Enderbury Islands: -11 hours
|
||||
Cape Verde: -1 hours
|
||||
Caroline Island: +11 hours
|
||||
Cayman Islands: -5 hours
|
||||
Central African Rep: +1 hours
|
||||
Chad: +1 hours
|
||||
Channel Islands: 0 hours (Local summer +1 hours)
|
||||
Chatham Island: +12.75 hours (Local summer +13.75 hours)
|
||||
Chile: -4 hours (Local summer -3 hours)
|
||||
China People's Rep: +8 hours
|
||||
Christmas Islands: -10 hours
|
||||
Cocos (Keeling) Islands: ( hours (Local summer ) hours)
|
||||
Colombia: -5 hours
|
||||
Congo: +1 hours
|
||||
Cook Islands: -10 hours
|
||||
Costa Rica: -6 hours
|
||||
Cote d'Ivoire: 0 hours
|
||||
Croatia: +1 hours (Local summer +2 hours)
|
||||
Cuba: -5 hours (Local summer -4 hours)
|
||||
Curacao: -4 hours
|
||||
Cyprus: +2 hours (Local summer +3 hours)
|
||||
Czech Republic: +1 hours (Local summer +2 hours)
|
||||
Dahomey: +1 hours
|
||||
Denmark: +1 hours (Local summer +2 hours)
|
||||
Djibouti: +3 hours
|
||||
Dominica: -4 hours
|
||||
Dominican Republic: -4 hours
|
||||
Easter Island: -6 hours (Local summer -5 hours)
|
||||
Ecuador: -5 hours
|
||||
Egypt: +2 hours (Local summer +3 hours)
|
||||
El Salvador: -6 hours
|
||||
England: 0 hours (Local summer +1 hours)
|
||||
Equitorial Guinea: +1 hours
|
||||
Eritrea: +3 hours
|
||||
Estonia: +2 hours (Local summer +3 hours)
|
||||
Ethiopia: +3 hours
|
||||
Falkland Islands: -4 hours (Local summer -3 hours)
|
||||
Faroe Island: 0 hours (Local summer +1 hours)
|
||||
Fiji: +12 hours
|
||||
Finland: +2 hours (Local summer +3 hours)
|
||||
France: +1 hours (Local summer +2 hours)
|
||||
French Guiana: -3 hours
|
||||
French Polynesia: -10 hours
|
||||
Gabon: +1 hours
|
||||
Galapagos Islands: -5 hours
|
||||
Gambia: 0 hours
|
||||
Gambier Island: -9 hours
|
||||
Georgia: +4 hours
|
||||
Germany: +1 hours (Local summer +2 hours)
|
||||
Ghana: 0 hours
|
||||
Gibraltar: +1 hours (Local summer +2 hours)
|
||||
Greece: +2 hours (Local summer +3 hours)
|
||||
Greenland: -3 hours (Local summer -2 hours)
|
||||
Greenland Thule: -4 hours (Local summer -3 hours)
|
||||
Greenland Scoresbysun: -1 hours (Local summer 0 hours)
|
||||
Grenada: -4 hours
|
||||
Grenadines: -4 hours
|
||||
Guadeloupe: -4 hours
|
||||
Guam: +10 hours
|
||||
Guatemala: -6 hours
|
||||
Guinea: 0 hours
|
||||
Guinea Bissau: - hours (Local summer 0 hours)
|
||||
Guyana: -3 hours
|
||||
Haiti: -5 hours (Local summer -4 hours)
|
||||
Honduras: -6 hours
|
||||
Hong kong: +8 hours
|
||||
Hungary: +1 hours (Local summer +2 hours)
|
||||
Iceland: 0 hours
|
||||
India: +5.5 hours
|
||||
Indonesia Central: +8 hours
|
||||
Indonesia East: +9 hours
|
||||
Indonesia West: +7 hours
|
||||
Iran: +3.5 hours
|
||||
Iraq: +3 hours (Local summer +4 hours)
|
||||
Ireland Republic of: 0 hours (Local summer +1 hours)
|
||||
Israel: +2 hours (Local summer +3 hours)
|
||||
Italy: +1 hours (Local summer +2 hours)
|
||||
Jamaica: -5 hours
|
||||
Japan: +9 hours
|
||||
Johnston Island: -10 hours
|
||||
Jordan: +2 hours (Local summer +3 hours)
|
||||
Kazakhstan: +6 hours (Local summer +7 hours)
|
||||
Kenya: +3 hours
|
||||
Kiribati: +12 hours
|
||||
Korea Dem Republic of: +9 hours
|
||||
Korea Republic of: +9 hours
|
||||
Kusaie: +12 hours
|
||||
Kuwait: +3 hours
|
||||
Kwajalein: -12 hours
|
||||
Kyrgyzstan: +5 hours (Local summer +6 hours)
|
||||
Laos: +7 hours
|
||||
Latvia: +2 hours (Local summer +3 hours)
|
||||
Lebanon: +2 hours (Local summer +3 hours)
|
||||
Leeward Islands: -4 hours
|
||||
Lesotho: +2 hours
|
||||
Liberia: 0 hours
|
||||
Libya: +2 hours
|
||||
Lithuania: +2 hours (Local summer +3 hours)
|
||||
Luxembourg: +1 hours (Local summer +2 hours)
|
||||
Macedonia: +1 hours (Local summer +2 hours)
|
||||
Madagascar: +3 hours
|
||||
Madeira: 0 hours (Local summer +1 hours)
|
||||
Malawi: +2 hours
|
||||
Malaysia: +8 hours
|
||||
Maldives: +5 hours
|
||||
Mali: 0 hours
|
||||
Mallorca Islands: +1 hours (Local summer +2 hours)
|
||||
Malta: +1 hours (Local summer +2 hours)
|
||||
Mariana Island: +10 hours
|
||||
Marquesas Islands: -9.5 hours
|
||||
Marshall Islands: +12 hours
|
||||
Martinique: -4 hours
|
||||
Mauritania: 0 hours
|
||||
Mauritius: +4 hours
|
||||
Mayotte: +3 hours
|
||||
Melilla: +1 hours (Local summer +2 hours)
|
||||
Mexico: -6 hours
|
||||
Mexico Baja Calif Norte: -8 hours (Local summer -7 hours)
|
||||
Mexico Nayarit: -7 hours
|
||||
Mexico Sinaloa: -7 hours
|
||||
Mexico Sonora: -7 hours
|
||||
Midway Island: -11 hours
|
||||
Moldova: +2 hours (Local summer +3 hours)
|
||||
Moldovian Rep Pridnestrovye: +2 hours (Local summer +3 hours)
|
||||
Monaco: +1 hours (Local summer +2 hours)
|
||||
Mongolia: +8 hours
|
||||
Morocco: 0 hours
|
||||
Mozambique: +2 hours
|
||||
Myanmar: +6.5 hours
|
||||
Namibia: +1 hours (Local summer +2 hours)
|
||||
Nauru Republic of: +12 hours
|
||||
Nepal: +5.75 hours
|
||||
Netherlands: +1 hours (Local summer +2 hours)
|
||||
Netherlands Antilles: -4 hours
|
||||
Nevis Montserrat: -4 hours
|
||||
New Caledonia: +11 hours
|
||||
New Hebrides: +11 hours
|
||||
New Zealand: +12 hours (Local summer +13 hours)
|
||||
Nicaragua: -6 hours (Local summer -5 hours)
|
||||
Niger: +1 hours
|
||||
Nigeria: +1 hours
|
||||
Niue Island: -11 hours
|
||||
Norfolk Island: +11.5 hours
|
||||
Northern Ireland: 0 hours (Local summer +1 hours)
|
||||
Northern Mariana Islands: +10 hours
|
||||
Norway: +1 hours (Local summer +2 hours)
|
||||
Oman: +4 hours
|
||||
Pakistan: +5 hours
|
||||
Palau: +9 hours
|
||||
Panama: -5 hours
|
||||
Papua New Guinea: +10 hours
|
||||
Paraguay: -4 hours (Local summer -3 hours)
|
||||
Peru: -5 hours
|
||||
Philippines: +8 hours
|
||||
Pingelap: +12 hours
|
||||
Poland: +1 hours (Local summer +2 hours)
|
||||
Ponape Island: +11 hours
|
||||
Portugal: +1 hours (Local summer +2 hours)
|
||||
Principe Island: 0 hours
|
||||
Puerto Rico: -4 hours
|
||||
Qatar: +3 hours
|
||||
Reunion: +4 hours
|
||||
Romania: +2 hours (Local summer +3 hours)
|
||||
Russian Federation zone eight: +9 hours (Local summer +10 hours)
|
||||
Russian Federation zone eleven: +12 hours (Local summer +13 hours)
|
||||
Russian Federation zone five: +6 hours (Local summer +7 hours)
|
||||
Russian Federation zone four: +5 hours (Local summer +6 hours)
|
||||
Russian Federation zone nine: +10 hours (Local summer +11 hours)
|
||||
Russian Federation zone one: +2 hours (Local summer +3 hours)
|
||||
Russian Federation zone seven: +8 hours (Local summer +9 hours)
|
||||
Russian Federation zone six: +7 hours (Local summer +8 hours)
|
||||
Russian Federation zone ten: +11 hours (Local summer +12 hours)
|
||||
Russian Federation zone three: +4 hours (Local summer +5 hours)
|
||||
Russian Federation zone two: +4 hours (Local summer +5 hours)
|
||||
Rwanda: +2 hours
|
||||
Saba: -4 hours
|
||||
Samoa: -11 hours
|
||||
San Marino: +1 hours (Local summer +2 hours)
|
||||
Sao Tome e Principe: 0 hours
|
||||
Saudi Arabia: +3 hours
|
||||
Scotland: 0 hours (Local summer +1 hours)
|
||||
Senegal: 0 hours
|
||||
Seychelles: +4 hours
|
||||
Sierra Leone: 0 hours
|
||||
Singapore: +8 hours
|
||||
Slovakia: +1 hours (Local summer +2 hours)
|
||||
Slovenia: +1 hours (Local summer +2 hours)
|
||||
Society Island: -10 hours
|
||||
Solomon Islands: +11 hours
|
||||
Somalia: +3 hours
|
||||
South Africa: +2 hours
|
||||
Spain: +1 hours (Local summer +2 hours)
|
||||
Sri Lanka: +5.5 hours
|
||||
St Christopher: -4 hours
|
||||
St Croix: -4 hours
|
||||
St Helena: 0 hours
|
||||
St John: -4 hours
|
||||
St Kitts Nevis: -4 hours
|
||||
St Lucia: -4 hours
|
||||
St Maarten: -4 hours
|
||||
St Pierre & Miquelon: -3 hours (Local summer -2 hours)
|
||||
St Thomas: -4 hours
|
||||
St Vincent: -4 hours
|
||||
Sudan: +2 hours
|
||||
Suriname: -3 hours
|
||||
Swaziland: +2 hours
|
||||
Sweden: +1 hours (Local summer +2 hours)
|
||||
Switzerland: +1 hours (Local summer +2 hours)
|
||||
Syria: +2 hours (Local summer +3 hours)
|
||||
Tahiti: -10 hours
|
||||
Taiwan: +8 hours
|
||||
Tajikistan: +6 hours
|
||||
Tanzania: +3 hours
|
||||
Thailand: +7 hours
|
||||
Togo: 0 hours
|
||||
Tonga: +13 hours
|
||||
Trinidad and Tobago: -4 hours
|
||||
Tuamotu Island: -10 hours
|
||||
Tubuai Island: -10 hours
|
||||
Tunisia: +1 hours
|
||||
Turkey: +2 hours (Local summer +3 hours)
|
||||
Turkmenistan: +5 hours
|
||||
Turks and Caicos Islands: -5 hours (Local summer -4 hours)
|
||||
Tuvalu: +12 hours
|
||||
Uganda: +3 hours
|
||||
Ukraine: +2 hours (Local summer +3 hours)
|
||||
United Arab Emirates: +4 hours
|
||||
United Kingdom: 0 hours (Local summer +1 hours)
|
||||
USA Central: -6 hours (Local summer -5 hours)
|
||||
USA Eastern: -5 hours (Local summer -4 hours)
|
||||
USA Mountain: -7 hours (Local summer -6 hours)
|
||||
USA Arizona: -7 hours
|
||||
USA Indiana East: -5 hours
|
||||
USA Pacific: -8 hours (Local summer -7 hours)
|
||||
USA Alaska: -9 hours (Local summer -8 hours)
|
||||
USA Aleutian: -10 hours
|
||||
USA Hawaii: -10 hours
|
||||
Uruguay: -3 hours
|
||||
Uzbekistan: +5 hours
|
||||
Vanuatu: +11 hours (Local summer +12 hours)
|
||||
Vatican City: +1 hours (Local summer +2 hours)
|
||||
Venezuela: -4 hours
|
||||
Vietnam: +7 hours
|
||||
Virgin Islands: -4 hours
|
||||
Wake Island: +12 hours
|
||||
Wales: 0 hours (Local summer +1 hours)
|
||||
Wallis and Futuna Islands: +12 hours
|
||||
Windward Islands: -4 hours
|
||||
Yemen: +3 hours
|
||||
Yugoslavia: +1 hours (Local summer +2 hours)
|
||||
Zaire Kasai: +2 hours
|
||||
Zaire Kinshasa Mbandaka: +1 hours
|
||||
Zaire Haut Zaire: +2 hours
|
||||
Zaire Kivu: +2 hours
|
||||
Zaire Shaba: +2 hours
|
||||
Zambia: +2 hours
|
||||
Zimbabwe: +2 hours
|
||||
All timezone information is non-authoritative...
|
23
workman.sh
23
workman.sh
@ -1,20 +1,23 @@
|
||||
#! /bin/sh
|
||||
# Convert manual page troff stdin to formatted .txt stdout.
|
||||
|
||||
# <pre>
|
||||
# @(#)workman.sh 8.2
|
||||
# This file is in the public domain, so clarified as of
|
||||
# 2009-05-17 by Arthur David Olson.
|
||||
|
||||
# Tell groff not to emit SGR escape sequences (ANSI color escapes).
|
||||
GROFF_NO_SGR=1
|
||||
export GROFF_NO_SGR
|
||||
if (type nroff && type perl) >/dev/null 2>&1; then
|
||||
|
||||
echo ".am TH
|
||||
# Tell groff not to emit SGR escape sequences (ANSI color escapes).
|
||||
GROFF_NO_SGR=1
|
||||
export GROFF_NO_SGR
|
||||
|
||||
echo ".am TH
|
||||
.hy 0
|
||||
.na
|
||||
..
|
||||
.rm }H
|
||||
.rm }F" | nroff -man - ${1+"$@"} | perl -ne '
|
||||
binmode STDIN, '\'':encoding(utf8)'\'';
|
||||
binmode STDOUT, '\'':encoding(utf8)'\'';
|
||||
chomp;
|
||||
s/.\010//g;
|
||||
s/\s*$//;
|
||||
@ -29,4 +32,10 @@ echo ".am TH
|
||||
print "$_\n";
|
||||
$didprint = 1;
|
||||
}
|
||||
'
|
||||
'
|
||||
elif (type mandoc && type col) >/dev/null 2>&1; then
|
||||
mandoc -man -T ascii "$@" | col -bx
|
||||
else
|
||||
echo >&2 "$0: please install nroff and perl, or mandoc and col"
|
||||
exit 1
|
||||
fi
|
||||
|
254
zdump.8
254
zdump.8
@ -1,59 +1,231 @@
|
||||
.TH ZDUMP 8
|
||||
.SH NAME
|
||||
zdump \- time zone dumper
|
||||
zdump \- timezone dumper
|
||||
.SH SYNOPSIS
|
||||
.B zdump
|
||||
[
|
||||
.B \-\-version
|
||||
]
|
||||
[
|
||||
.B \-v
|
||||
] [
|
||||
.B \-c
|
||||
[loyear,]hiyear ] [ zonename ... ]
|
||||
.I option
|
||||
\&... ] [
|
||||
.I timezone
|
||||
\&... ]
|
||||
.SH DESCRIPTION
|
||||
.I Zdump
|
||||
prints the current time in each
|
||||
.I zonename
|
||||
.ie '\(lq'' .ds lq \&"\"
|
||||
.el .ds lq \(lq\"
|
||||
.ie '\(rq'' .ds rq \&"\"
|
||||
.el .ds rq \(rq\"
|
||||
.de q
|
||||
\\$3\*(lq\\$1\*(rq\\$2
|
||||
..
|
||||
.ie \n(.g .ds - \f(CW-\fP
|
||||
.el .ds - \-
|
||||
The
|
||||
.B zdump
|
||||
program prints the current time in each
|
||||
.I timezone
|
||||
named on the command line.
|
||||
.PP
|
||||
These options are available:
|
||||
.SH OPTIONS
|
||||
.TP
|
||||
.BI "\-\-version"
|
||||
.B \*-\*-version
|
||||
Output version information and exit.
|
||||
.TP
|
||||
.B \-v
|
||||
For each
|
||||
.I zonename
|
||||
on the command line,
|
||||
print the time at the lowest possible time value,
|
||||
the time one day after the lowest possible time value,
|
||||
the times both one second before and exactly at
|
||||
each detected time discontinuity,
|
||||
the time at one day less than the highest possible time value,
|
||||
and the time at the highest possible time value,
|
||||
Each line ends with
|
||||
.B isdst=1
|
||||
if the given time is Daylight Saving Time or
|
||||
.B isdst=0
|
||||
otherwise.
|
||||
.B \*-\*-help
|
||||
Output short usage message and exit.
|
||||
.TP
|
||||
.BI "\-c " [loyear,]hiyear
|
||||
Cut off verbose output near the start of the given year(s).
|
||||
By default,
|
||||
the program cuts off verbose output near the starts of the years -500 and 2500.
|
||||
.SH LIMITATIONS
|
||||
.B \*-i
|
||||
Output a description of time intervals. For each
|
||||
.I timezone
|
||||
on the command line, output an interval-format description of the
|
||||
timezone. See
|
||||
.q "INTERVAL FORMAT"
|
||||
below.
|
||||
.TP
|
||||
.B \*-v
|
||||
Output a verbose description of time intervals.
|
||||
For each
|
||||
.I timezone
|
||||
on the command line,
|
||||
print the times at the two extreme time values,
|
||||
the times (if present) at and just beyond the boundaries of years that
|
||||
.BR localtime (3)
|
||||
and
|
||||
.BR gmtime (3)
|
||||
can represent, and
|
||||
the times both one second before and exactly at
|
||||
each detected time discontinuity.
|
||||
Each line is followed by
|
||||
.BI isdst= D
|
||||
where
|
||||
.I D
|
||||
is positive, zero, or negative depending on whether
|
||||
the given time is daylight saving time, standard time,
|
||||
or an unknown time type, respectively.
|
||||
Each line is also followed by
|
||||
.BI gmtoff= N
|
||||
if the given local time is known to be
|
||||
.I N
|
||||
seconds east of Greenwich.
|
||||
.TP
|
||||
.B \*-V
|
||||
Like
|
||||
.BR \*-v ,
|
||||
except omit output concerning extreme time and year values.
|
||||
This generates output that is easier to compare to that of
|
||||
implementations with different time representations.
|
||||
.TP
|
||||
.BI "\*-c " \fR[\fIloyear , \fR]\fIhiyear
|
||||
Cut off interval output at the given year(s).
|
||||
Cutoff times are computed using the proleptic Gregorian calendar with year 0
|
||||
and with Universal Time (UT) ignoring leap seconds.
|
||||
Cutoffs are at the start of each year, where the lower-bound
|
||||
timestamp is inclusive and the upper is exclusive; for example,
|
||||
.B "\*-c 1970,2070"
|
||||
selects transitions on or after 1970-01-01 00:00:00 UTC
|
||||
and before 2070-01-01 00:00:00 UTC.
|
||||
The default cutoff is
|
||||
.BR \*-500,2500 .
|
||||
.TP
|
||||
.BI "\*-t " \fR[\fIlotime , \fR]\fIhitime
|
||||
Cut off interval output at the given time(s),
|
||||
given in decimal seconds since 1970-01-01 00:00:00
|
||||
Coordinated Universal Time (UTC).
|
||||
The
|
||||
.B \-v
|
||||
option may not be used on systems with floating-point time_t values
|
||||
that are neither float nor double.
|
||||
.I timezone
|
||||
determines whether the count includes leap seconds.
|
||||
As with
|
||||
.BR \*-c ,
|
||||
the cutoff's lower bound is inclusive and its upper bound is exclusive.
|
||||
.SH "INTERVAL FORMAT"
|
||||
The interval format is a compact text representation that is intended
|
||||
to be both human- and machine-readable. It consists of an empty line,
|
||||
then a line
|
||||
.q "TZ=\fIstring\fP"
|
||||
where
|
||||
.I string
|
||||
is a double-quoted string giving the timezone, a second line
|
||||
.q "\*- \*- \fIinterval\fP"
|
||||
describing the time interval before the first transition if any, and
|
||||
zero or more following lines
|
||||
.q "\fIdate time interval\fP",
|
||||
one line for each transition time and following interval. Fields are
|
||||
separated by single tabs.
|
||||
.PP
|
||||
Time discontinuities are found by sampling the results returned by localtime
|
||||
Dates are in
|
||||
.IR yyyy - mm - dd
|
||||
format and times are in 24-hour
|
||||
.IR hh : mm : ss
|
||||
format where
|
||||
.IR hh <24.
|
||||
Times are in local time immediately after the transition. A
|
||||
time interval description consists of a UT offset in signed
|
||||
.RI \(+- hhmmss
|
||||
format, a time zone abbreviation, and an isdst flag. An abbreviation
|
||||
that equals the UT offset is omitted; other abbreviations are
|
||||
double-quoted strings unless they consist of one or more alphabetic
|
||||
characters. An isdst flag is omitted for standard time, and otherwise
|
||||
is a decimal integer that is unsigned and positive (typically 1) for
|
||||
daylight saving time and negative for unknown.
|
||||
.PP
|
||||
In times and in UT offsets with absolute value less than 100 hours,
|
||||
the seconds are omitted if they are zero, and
|
||||
the minutes are also omitted if they are also zero. Positive UT
|
||||
offsets are east of Greenwich. The UT offset \*-00 denotes a UT
|
||||
placeholder in areas where the actual offset is unspecified; by
|
||||
convention, this occurs when the UT offset is zero and the time zone
|
||||
abbreviation begins with
|
||||
.q "\*-"
|
||||
or is
|
||||
.q "zzz".
|
||||
.PP
|
||||
In double-quoted strings, escape sequences represent unusual
|
||||
characters. The escape sequences are \es for space, and \e", \e\e,
|
||||
\ef, \en, \er, \et, and \ev with their usual meaning in the C
|
||||
programming language. E.g., the double-quoted string
|
||||
\*(lq"CET\es\e"\e\e"\*(rq represents the character sequence \*(lqCET
|
||||
"\e\*(rq.\""
|
||||
.PP
|
||||
.ne 9
|
||||
Here is an example of the output, with the leading empty line omitted.
|
||||
(This example is shown with tab stops set far enough apart so that the
|
||||
tabbed columns line up.)
|
||||
.nf
|
||||
.sp
|
||||
.if \n(.g .ft CW
|
||||
.if t .in +.5i
|
||||
.if n .in +2
|
||||
.nr w \w'1896-01-13 'u+\n(.i
|
||||
.ta \w'1896-01-13 'u +\w'12:01:26 'u +\w'-103126 'u +\w'HWT 'u
|
||||
TZ="Pacific/Honolulu"
|
||||
- - -103126 LMT
|
||||
1896-01-13 12:01:26 -1030 HST
|
||||
1933-04-30 03 -0930 HDT 1
|
||||
1933-05-21 11 -1030 HST
|
||||
1942-02-09 03 -0930 HWT 1
|
||||
1945-08-14 13:30 -0930 HPT 1
|
||||
1945-09-30 01 -1030 HST
|
||||
1947-06-08 02:30 -10 HST
|
||||
.in
|
||||
.if \n(.g .ft
|
||||
.sp
|
||||
.fi
|
||||
Here, local time begins 10 hours, 31 minutes and 26 seconds west of
|
||||
UT, and is a standard time abbreviated LMT. Immediately after the
|
||||
first transition, the date is 1896-01-13 and the time is 12:01:26, and
|
||||
the following time interval is 10.5 hours west of UT, a standard time
|
||||
abbreviated HST. Immediately after the second transition, the date is
|
||||
1933-04-30 and the time is 03:00:00 and the following time interval is
|
||||
9.5 hours west of UT, is abbreviated HDT, and is daylight saving time.
|
||||
Immediately after the last transition the date is 1947-06-08 and the
|
||||
time is 02:30:00, and the following time interval is 10 hours west of
|
||||
UT, a standard time abbreviated HST.
|
||||
.PP
|
||||
.ne 10
|
||||
Here are excerpts from another example:
|
||||
.nf
|
||||
.sp
|
||||
.if \n(.g .ft CW
|
||||
.if t .in +.5i
|
||||
.if n .in +2
|
||||
TZ="Europe/Astrakhan"
|
||||
- - +031212 LMT
|
||||
1924-04-30 23:47:48 +03
|
||||
1930-06-21 01 +04
|
||||
1981-04-01 01 +05 1
|
||||
1981-09-30 23 +04
|
||||
\&...
|
||||
2014-10-26 01 +03
|
||||
2016-03-27 03 +04
|
||||
.in
|
||||
.if \n(.g .ft
|
||||
.sp
|
||||
.fi
|
||||
This time zone is east of UT, so its UT offsets are positive. Also,
|
||||
many of its time zone abbreviations are omitted since they duplicate
|
||||
the text of the UT offset.
|
||||
.SH LIMITATIONS
|
||||
Time discontinuities are found by sampling the results returned by
|
||||
.BR localtime (3)
|
||||
at twelve-hour intervals.
|
||||
This works in all real-world cases;
|
||||
one can construct artificial time zones for which this fails.
|
||||
.SH "SEE ALSO"
|
||||
newctime(3), tzfile(5), zic(8)
|
||||
.\" @(#)zdump.8 8.2
|
||||
.PP
|
||||
In the
|
||||
.B \*-v
|
||||
and
|
||||
.B \*-V
|
||||
output,
|
||||
.q "UT"
|
||||
denotes the value returned by
|
||||
.BR gmtime (3),
|
||||
which uses UTC for modern timestamps and some other UT flavor for
|
||||
timestamps that predate the introduction of UTC.
|
||||
No attempt is currently made to have the output use
|
||||
.q "UTC"
|
||||
for newer and
|
||||
.q "UT"
|
||||
for older timestamps, partly because the exact date of the
|
||||
introduction of UTC is problematic.
|
||||
.SH SEE ALSO
|
||||
.BR tzfile (5),
|
||||
.BR zic (8)
|
||||
.\" This file is in the public domain, so clarified as of
|
||||
.\" 2009-05-17 by Arthur David Olson.
|
||||
|
159
zdump.8.txt
159
zdump.8.txt
@ -1,43 +1,144 @@
|
||||
NAME
|
||||
ZDUMP(8) System Manager's Manual ZDUMP(8)
|
||||
|
||||
zdump - time zone dumper
|
||||
NAME
|
||||
zdump - timezone dumper
|
||||
|
||||
SYNOPSIS
|
||||
zdump [ --version ] [ -v ] [ -c [loyear,]hiyear ] [ zonename
|
||||
... ]
|
||||
zdump [ option ... ] [ timezone ... ]
|
||||
|
||||
DESCRIPTION
|
||||
Zdump prints the current time in each zonename named on the
|
||||
command line.
|
||||
The zdump program prints the current time in each timezone named on the
|
||||
command line.
|
||||
|
||||
These options are available:
|
||||
OPTIONS
|
||||
--version
|
||||
Output version information and exit.
|
||||
|
||||
--version
|
||||
Output version information and exit.
|
||||
--help Output short usage message and exit.
|
||||
|
||||
-v For each zonename on the command line, print the time
|
||||
at the lowest possible time value, the time one day
|
||||
after the lowest possible time value, the times both
|
||||
one second before and exactly at each detected time
|
||||
discontinuity, the time at one day less than the
|
||||
highest possible time value, and the time at the
|
||||
highest possible time value, Each line ends with
|
||||
isdst=1 if the given time is Daylight Saving Time or
|
||||
isdst=0 otherwise.
|
||||
-i Output a description of time intervals. For each timezone on
|
||||
the command line, output an interval-format description of the
|
||||
timezone. See "INTERVAL FORMAT" below.
|
||||
|
||||
-c [loyear,]hiyear
|
||||
Cut off verbose output near the start of the given
|
||||
year(s). By default, the program cuts off verbose
|
||||
output near the starts of the years -500 and 2500.
|
||||
-v Output a verbose description of time intervals. For each
|
||||
timezone on the command line, print the times at the two extreme
|
||||
time values, the times (if present) at and just beyond the
|
||||
boundaries of years that localtime(3) and gmtime(3) can
|
||||
represent, and the times both one second before and exactly at
|
||||
each detected time discontinuity. Each line is followed by
|
||||
isdst=D where D is positive, zero, or negative depending on
|
||||
whether the given time is daylight saving time, standard time,
|
||||
or an unknown time type, respectively. Each line is also
|
||||
followed by gmtoff=N if the given local time is known to be N
|
||||
seconds east of Greenwich.
|
||||
|
||||
-V Like -v, except omit output concerning extreme time and year
|
||||
values. This generates output that is easier to compare to that
|
||||
of implementations with different time representations.
|
||||
|
||||
-c [loyear,]hiyear
|
||||
Cut off interval output at the given year(s). Cutoff times are
|
||||
computed using the proleptic Gregorian calendar with year 0 and
|
||||
with Universal Time (UT) ignoring leap seconds. Cutoffs are at
|
||||
the start of each year, where the lower-bound timestamp is
|
||||
inclusive and the upper is exclusive; for example, -c 1970,2070
|
||||
selects transitions on or after 1970-01-01 00:00:00 UTC and
|
||||
before 2070-01-01 00:00:00 UTC. The default cutoff is
|
||||
-500,2500.
|
||||
|
||||
-t [lotime,]hitime
|
||||
Cut off interval output at the given time(s), given in decimal
|
||||
seconds since 1970-01-01 00:00:00 Coordinated Universal Time
|
||||
(UTC). The timezone determines whether the count includes leap
|
||||
seconds. As with -c, the cutoff's lower bound is inclusive and
|
||||
its upper bound is exclusive.
|
||||
|
||||
INTERVAL FORMAT
|
||||
The interval format is a compact text representation that is intended
|
||||
to be both human- and machine-readable. It consists of an empty line,
|
||||
then a line "TZ=string" where string is a double-quoted string giving
|
||||
the timezone, a second line "- - interval" describing the time interval
|
||||
before the first transition if any, and zero or more following lines
|
||||
"date time interval", one line for each transition time and following
|
||||
interval. Fields are separated by single tabs.
|
||||
|
||||
Dates are in yyyy-mm-dd format and times are in 24-hour hh:mm:ss format
|
||||
where hh<24. Times are in local time immediately after the transition.
|
||||
A time interval description consists of a UT offset in signed +-hhmmss
|
||||
format, a time zone abbreviation, and an isdst flag. An abbreviation
|
||||
that equals the UT offset is omitted; other abbreviations are double-
|
||||
quoted strings unless they consist of one or more alphabetic
|
||||
characters. An isdst flag is omitted for standard time, and otherwise
|
||||
is a decimal integer that is unsigned and positive (typically 1) for
|
||||
daylight saving time and negative for unknown.
|
||||
|
||||
In times and in UT offsets with absolute value less than 100 hours, the
|
||||
seconds are omitted if they are zero, and the minutes are also omitted
|
||||
if they are also zero. Positive UT offsets are east of Greenwich. The
|
||||
UT offset -00 denotes a UT placeholder in areas where the actual offset
|
||||
is unspecified; by convention, this occurs when the UT offset is zero
|
||||
and the time zone abbreviation begins with "-" or is "zzz".
|
||||
|
||||
In double-quoted strings, escape sequences represent unusual
|
||||
characters. The escape sequences are \s for space, and \", \\, \f, \n,
|
||||
\r, \t, and \v with their usual meaning in the C programming language.
|
||||
E.g., the double-quoted string ""CET\s\"\\"" represents the character
|
||||
sequence "CET "\".
|
||||
|
||||
Here is an example of the output, with the leading empty line omitted.
|
||||
(This example is shown with tab stops set far enough apart so that the
|
||||
tabbed columns line up.)
|
||||
|
||||
TZ="Pacific/Honolulu"
|
||||
- - -103126 LMT
|
||||
1896-01-13 12:01:26 -1030 HST
|
||||
1933-04-30 03 -0930 HDT 1
|
||||
1933-05-21 11 -1030 HST
|
||||
1942-02-09 03 -0930 HWT 1
|
||||
1945-08-14 13:30 -0930 HPT 1
|
||||
1945-09-30 01 -1030 HST
|
||||
1947-06-08 02:30 -10 HST
|
||||
|
||||
Here, local time begins 10 hours, 31 minutes and 26 seconds west of UT,
|
||||
and is a standard time abbreviated LMT. Immediately after the first
|
||||
transition, the date is 1896-01-13 and the time is 12:01:26, and the
|
||||
following time interval is 10.5 hours west of UT, a standard time
|
||||
abbreviated HST. Immediately after the second transition, the date is
|
||||
1933-04-30 and the time is 03:00:00 and the following time interval is
|
||||
9.5 hours west of UT, is abbreviated HDT, and is daylight saving time.
|
||||
Immediately after the last transition the date is 1947-06-08 and the
|
||||
time is 02:30:00, and the following time interval is 10 hours west of
|
||||
UT, a standard time abbreviated HST.
|
||||
|
||||
Here are excerpts from another example:
|
||||
|
||||
TZ="Europe/Astrakhan"
|
||||
- - +031212 LMT
|
||||
1924-04-30 23:47:48 +03
|
||||
1930-06-21 01 +04
|
||||
1981-04-01 01 +05 1
|
||||
1981-09-30 23 +04
|
||||
...
|
||||
2014-10-26 01 +03
|
||||
2016-03-27 03 +04
|
||||
|
||||
This time zone is east of UT, so its UT offsets are positive. Also,
|
||||
many of its time zone abbreviations are omitted since they duplicate
|
||||
the text of the UT offset.
|
||||
|
||||
LIMITATIONS
|
||||
The -v option may not be used on systems with floating-point
|
||||
time_t values that are neither float nor double.
|
||||
Time discontinuities are found by sampling the results returned by
|
||||
localtime(3) at twelve-hour intervals. This works in all real-world
|
||||
cases; one can construct artificial time zones for which this fails.
|
||||
|
||||
Time discontinuities are found by sampling the results
|
||||
returned by localtime at twelve-hour intervals. This works
|
||||
in all real-world cases; one can construct artificial time
|
||||
zones for which this fails.
|
||||
In the -v and -V output, "UT" denotes the value returned by gmtime(3),
|
||||
which uses UTC for modern timestamps and some other UT flavor for
|
||||
timestamps that predate the introduction of UTC. No attempt is
|
||||
currently made to have the output use "UTC" for newer and "UT" for
|
||||
older timestamps, partly because the exact date of the introduction of
|
||||
UTC is problematic.
|
||||
|
||||
SEE ALSO
|
||||
newctime(3), tzfile(5), zic(8)
|
||||
tzfile(5), zic(8)
|
||||
|
||||
ZDUMP(8)
|
||||
|
676
zic.8.txt
676
zic.8.txt
@ -1,313 +1,505 @@
|
||||
NAME
|
||||
ZIC(8) System Manager's Manual ZIC(8)
|
||||
|
||||
zic - time zone compiler
|
||||
NAME
|
||||
zic - timezone compiler
|
||||
|
||||
SYNOPSIS
|
||||
zic [ --version ] [ -v ] [ -d directory ] [ -l localtime ] [
|
||||
-p posixrules ] [ -L leapsecondfilename ] [ -s ] [ -y
|
||||
command ] [ filename ... ]
|
||||
zic [ option ... ] [ filename ... ]
|
||||
|
||||
DESCRIPTION
|
||||
Zic reads text from the file(s) named on the command line
|
||||
and creates the time conversion information files specified
|
||||
in this input. If a filename is -, the standard input is
|
||||
read.
|
||||
The zic program reads text from the file(s) named on the command line
|
||||
and creates the timezone information format (TZif) files specified in
|
||||
this input. If a filename is "-", standard input is read.
|
||||
|
||||
These options are available:
|
||||
OPTIONS
|
||||
--version
|
||||
Output version information and exit.
|
||||
|
||||
--version
|
||||
Output version information and exit.
|
||||
--help Output short usage message and exit.
|
||||
|
||||
-d directory
|
||||
Create time conversion information files in the named
|
||||
directory rather than in the standard directory named
|
||||
below.
|
||||
-b bloat
|
||||
Output backward-compatibility data as specified by bloat. If
|
||||
bloat is fat, generate additional data entries that work around
|
||||
potential bugs or incompatibilities in older software, such as
|
||||
software that mishandles the 64-bit generated data. If bloat is
|
||||
slim, keep the output files small; this can help check for the
|
||||
bugs and incompatibilities. The default is slim, as software
|
||||
that mishandles 64-bit data typically mishandles timestamps
|
||||
after the year 2038 anyway. Also see the -r option for another
|
||||
way to alter output size.
|
||||
|
||||
-l timezone
|
||||
Use the given time zone as local time. Zic will act as
|
||||
if the input contained a link line of the form
|
||||
-d directory
|
||||
Create time conversion information files in the named directory
|
||||
rather than in the standard directory named below.
|
||||
|
||||
Link timezone localtime
|
||||
-l timezone
|
||||
Use timezone as local time. zic will act as if the input
|
||||
contained a link line of the form
|
||||
|
||||
-p timezone
|
||||
Use the given time zone's rules when handling POSIX-
|
||||
format time zone environment variables. Zic will act
|
||||
as if the input contained a link line of the form
|
||||
Link timezone localtime
|
||||
|
||||
Link timezone posixrules
|
||||
If timezone is -, any already-existing link is removed.
|
||||
|
||||
-L leapsecondfilename
|
||||
Read leap second information from the file with the
|
||||
given name. If this option is not used, no leap second
|
||||
information appears in output files.
|
||||
-L leapsecondfilename
|
||||
Read leap second information from the file with the given name.
|
||||
If this option is not used, no leap second information appears
|
||||
in output files.
|
||||
|
||||
-v Complain if a year that appears in a data file is
|
||||
outside the range of years representable by time(2)
|
||||
values. Also complain if a time of 24:00 (which cannot
|
||||
be handled by pre-1998 versions of zic) appears in the
|
||||
input.
|
||||
-p timezone
|
||||
Use timezone's rules when handling nonstandard TZ strings like
|
||||
"EET-2EEST" that lack transition rules. zic will act as if the
|
||||
input contained a link line of the form
|
||||
|
||||
-s Limit time values stored in output files to values that
|
||||
are the same whether they're taken to be signed or
|
||||
unsigned. You can use this option to generate SVVS-
|
||||
compatible files.
|
||||
Link timezone posixrules
|
||||
|
||||
-y command
|
||||
Use the given command rather than yearistype when
|
||||
checking year types (see below).
|
||||
This feature is obsolete and poorly supported. Among other
|
||||
things it should not be used for timestamps after the year 2037,
|
||||
and it should not be combined with -b slim if timezone's
|
||||
transitions are at standard time or Universal Time (UT) instead
|
||||
of local time.
|
||||
|
||||
Input lines are made up of fields. Fields are separated
|
||||
from one another by any number of white space characters.
|
||||
Leading and trailing white space on input lines is ignored.
|
||||
An unquoted sharp character (#) in the input introduces a
|
||||
comment which extends to the end of the line the sharp
|
||||
character appears on. White space characters and sharp
|
||||
characters may be enclosed in double quotes (") if they're
|
||||
to be used as part of a field. Any line that is blank
|
||||
(after comment stripping) is ignored. Non-blank lines are
|
||||
expected to be of one of three types: rule lines, zone
|
||||
lines, and link lines.
|
||||
If timezone is -, any already-existing link is removed.
|
||||
|
||||
Names (such as month names) must be in English and are case
|
||||
insensitive. Abbreviations, if used, must be unambiguous in
|
||||
context.
|
||||
-r [@lo][/@hi]
|
||||
Limit the applicability of output files to timestamps in the
|
||||
range from lo (inclusive) to hi (exclusive), where lo and hi are
|
||||
possibly-signed decimal counts of seconds since the Epoch
|
||||
(1970-01-01 00:00:00 UTC). Omitted counts default to extreme
|
||||
values. The output files use UT offset 0 and abbreviation "-00"
|
||||
in place of the omitted timestamp data. For example, "zic -r
|
||||
@0" omits data intended for negative timestamps (i.e., before
|
||||
the Epoch), and "zic -r @0/@2147483648" outputs data intended
|
||||
only for nonnegative timestamps that fit into 31-bit signed
|
||||
integers. On platforms with GNU date, "zic -r @$(date +%s)"
|
||||
omits data intended for past timestamps. Although this option
|
||||
typically reduces the output file's size, the size can increase
|
||||
due to the need to represent the timestamp range boundaries,
|
||||
particularly if hi causes a TZif file to contain explicit
|
||||
entries for pre-hi transitions rather than concisely
|
||||
representing them with an extended POSIX TZ string. Also see
|
||||
the -b slim option for another way to shrink output size.
|
||||
|
||||
A rule line has the form
|
||||
-R @hi Generate redundant trailing explicit transitions for timestamps
|
||||
that occur less than hi seconds since the Epoch, even though the
|
||||
transitions could be more concisely represented via the extended
|
||||
POSIX TZ string. This option does not affect the represented
|
||||
timestamps. Although it accommodates nonstandard TZif readers
|
||||
that ignore the extended POSIX TZ string, it increases the size
|
||||
of the altered output files.
|
||||
|
||||
Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
|
||||
-t file
|
||||
When creating local time information, put the configuration link
|
||||
in the named file rather than in the standard location.
|
||||
|
||||
For example:
|
||||
-v Be more verbose, and complain about the following situations:
|
||||
|
||||
Rule US 1967 1973 - Apr lastSun 2:00 1:00 D
|
||||
The input specifies a link to a link.
|
||||
|
||||
The fields that make up a rule line are:
|
||||
A year that appears in a data file is outside the range of
|
||||
representable years.
|
||||
|
||||
NAME Gives the (arbitrary) name of the set of rules this
|
||||
rule is part of.
|
||||
A time of 24:00 or more appears in the input. Pre-1998 versions
|
||||
of zic prohibit 24:00, and pre-2007 versions prohibit times
|
||||
greater than 24:00.
|
||||
|
||||
FROM Gives the first year in which the rule applies. Any
|
||||
integer year can be supplied; the Gregorian calendar
|
||||
is assumed. The word minimum (or an abbreviation)
|
||||
means the minimum year representable as an integer.
|
||||
The word maximum (or an abbreviation) means the
|
||||
maximum year representable as an integer. Rules can
|
||||
describe times that are not representable as time
|
||||
values, with the unrepresentable times ignored; this
|
||||
allows rules to be portable among hosts with
|
||||
differing time value types.
|
||||
A rule goes past the start or end of the month. Pre-2004
|
||||
versions of zic prohibit this.
|
||||
|
||||
TO Gives the final year in which the rule applies. In
|
||||
addition to minimum and maximum (as above), the word
|
||||
only (or an abbreviation) may be used to repeat the
|
||||
value of the FROM field.
|
||||
A time zone abbreviation uses a %z format. Pre-2015 versions of
|
||||
zic do not support this.
|
||||
|
||||
TYPE Gives the type of year in which the rule applies.
|
||||
If TYPE is - then the rule applies in all years
|
||||
between FROM and TO inclusive. If TYPE is something
|
||||
else, then zic executes the command
|
||||
yearistype year type
|
||||
to check the type of a year: an exit status of zero
|
||||
is taken to mean that the year is of the given type;
|
||||
an exit status of one is taken to mean that the year
|
||||
is not of the given type.
|
||||
A timestamp contains fractional seconds. Pre-2018 versions of
|
||||
zic do not support this.
|
||||
|
||||
IN Names the month in which the rule takes effect.
|
||||
Month names may be abbreviated.
|
||||
The input contains abbreviations that are mishandled by pre-2018
|
||||
versions of zic due to a longstanding coding bug. These
|
||||
abbreviations include "L" for "Link", "mi" for "min", "Sa" for
|
||||
"Sat", and "Su" for "Sun".
|
||||
|
||||
ON Gives the day on which the rule takes effect.
|
||||
Recognized forms include:
|
||||
The output file does not contain all the information about the
|
||||
long-term future of a timezone, because the future cannot be
|
||||
summarized as an extended POSIX TZ string. For example, as of
|
||||
2019 this problem occurs for Iran's daylight-saving rules for
|
||||
the predicted future, as these rules are based on the Iranian
|
||||
calendar, which cannot be represented.
|
||||
|
||||
5 the fifth of the month
|
||||
lastSun the last Sunday in the month
|
||||
lastMon the last Monday in the month
|
||||
Sun>=8 first Sunday on or after the eighth
|
||||
Sun<=25 last Sunday on or before the 25th
|
||||
The output contains data that may not be handled properly by
|
||||
client code designed for older zic output formats. These
|
||||
compatibility issues affect only timestamps before 1970 or after
|
||||
the start of 2038.
|
||||
|
||||
Names of days of the week may be abbreviated or
|
||||
spelled out in full. Note that there must be no
|
||||
spaces within the ON field.
|
||||
The output contains a truncated leap second table, which can
|
||||
cause some older TZif readers to misbehave. This can occur if
|
||||
the -L option is used, and either an Expires line is present or
|
||||
the -r option is also used.
|
||||
|
||||
AT Gives the time of day at which the rule takes
|
||||
effect. Recognized forms include:
|
||||
The output file contains more than 1200 transitions, which may
|
||||
be mishandled by some clients. The current reference client
|
||||
supports at most 2000 transitions; pre-2014 versions of the
|
||||
reference client support at most 1200 transitions.
|
||||
|
||||
2 time in hours
|
||||
2:00 time in hours and minutes
|
||||
15:00 24-hour format time (for times after noon)
|
||||
1:28:14 time in hours, minutes, and seconds
|
||||
- equivalent to 0
|
||||
A time zone abbreviation has fewer than 3 or more than 6
|
||||
characters. POSIX requires at least 3, and requires
|
||||
implementations to support at least 6.
|
||||
|
||||
where hour 0 is midnight at the start of the day,
|
||||
and hour 24 is midnight at the end of the day. Any
|
||||
of these forms may be followed by the letter w if
|
||||
the given time is local "wall clock" time, s if the
|
||||
given time is local "standard" time, or u (or g or
|
||||
z) if the given time is universal time; in the
|
||||
absence of an indicator, wall clock time is assumed.
|
||||
An output file name contains a byte that is not an ASCII letter,
|
||||
"-", "/", or "_"; or it contains a file name component that
|
||||
contains more than 14 bytes or that starts with "-".
|
||||
|
||||
SAVE Gives the amount of time to be added to local
|
||||
standard time when the rule is in effect. This
|
||||
field has the same format as the AT field (although,
|
||||
of course, the w and s suffixes are not used).
|
||||
FILES
|
||||
Input files use the format described in this section; output files use
|
||||
tzfile(5) format.
|
||||
|
||||
LETTER/S
|
||||
Gives the "variable part" (for example, the "S" or
|
||||
"D" in "EST" or "EDT") of time zone abbreviations to
|
||||
be used when this rule is in effect. If this field
|
||||
is -, the variable part is null.
|
||||
Input files should be text files, that is, they should be a series of
|
||||
zero or more lines, each ending in a newline byte and containing at
|
||||
most 2048 bytes counting the newline, and without any NUL bytes. The
|
||||
input text's encoding is typically UTF-8 or ASCII; it should have a
|
||||
unibyte representation for the POSIX Portable Character Set (PPCS)
|
||||
<https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap06
|
||||
.html> and the encoding's non-unibyte characters should consist
|
||||
entirely of non-PPCS bytes. Non-PPCS characters typically occur only
|
||||
in comments: although output file names and time zone abbreviations can
|
||||
contain nearly any character, other software will work better if these
|
||||
are limited to the restricted syntax described under the -v option.
|
||||
|
||||
A zone line has the form
|
||||
Input lines are made up of fields. Fields are separated from one
|
||||
another by one or more white space characters. The white space
|
||||
characters are space, form feed, carriage return, newline, tab, and
|
||||
vertical tab. Leading and trailing white space on input lines is
|
||||
ignored. An unquoted sharp character (#) in the input introduces a
|
||||
comment which extends to the end of the line the sharp character
|
||||
appears on. White space characters and sharp characters may be
|
||||
enclosed in double quotes (") if they're to be used as part of a field.
|
||||
Any line that is blank (after comment stripping) is ignored. Nonblank
|
||||
lines are expected to be of one of three types: rule lines, zone lines,
|
||||
and link lines.
|
||||
|
||||
Zone NAME GMTOFF RULES/SAVE FORMAT [UNTILYEAR [MONTH [DAY [TIME]]]]
|
||||
Names must be in English and are case insensitive. They appear in
|
||||
several contexts, and include month and weekday names and keywords such
|
||||
as maximum, only, Rolling, and Zone. A name can be abbreviated by
|
||||
omitting all but an initial prefix; any abbreviation must be
|
||||
unambiguous in context.
|
||||
|
||||
For example:
|
||||
A rule line has the form
|
||||
|
||||
Zone Australia/Adelaide 9:30 Aus CST 1971 Oct 31 2:00
|
||||
Rule NAME FROM TO - IN ON AT SAVE LETTER/S
|
||||
|
||||
The fields that make up a zone line are:
|
||||
For example:
|
||||
|
||||
NAME The name of the time zone. This is the name used in
|
||||
creating the time conversion information file for the
|
||||
zone.
|
||||
Rule US 1967 1973 - Apr lastSun 2:00w 1:00d D
|
||||
|
||||
GMTOFF
|
||||
The amount of time to add to UTC to get standard time
|
||||
in this zone. This field has the same format as the
|
||||
AT and SAVE fields of rule lines; begin the field with
|
||||
a minus sign if time must be subtracted from UTC.
|
||||
The fields that make up a rule line are:
|
||||
|
||||
RULES/SAVE
|
||||
The name of the rule(s) that apply in the time zone
|
||||
or, alternately, an amount of time to add to local
|
||||
standard time. If this field is - then standard time
|
||||
always applies in the time zone.
|
||||
NAME Gives the name of the rule set that contains this line. The
|
||||
name must start with a character that is neither an ASCII digit
|
||||
nor "-" nor "+". To allow for future extensions, an unquoted
|
||||
name should not contain characters from the set
|
||||
"!$%&'()*,/:;<=>?@[\]^`{|}~".
|
||||
|
||||
FORMAT
|
||||
The format for time zone abbreviations in this time
|
||||
zone. The pair of characters %s is used to show where
|
||||
the "variable part" of the time zone abbreviation
|
||||
goes. Alternately, a slash (/) separates standard and
|
||||
daylight abbreviations.
|
||||
FROM Gives the first year in which the rule applies. Any signed
|
||||
integer year can be supplied; the proleptic Gregorian calendar
|
||||
is assumed, with year 0 preceding year 1. The word minimum (or
|
||||
an abbreviation) means the indefinite past. The word maximum
|
||||
(or an abbreviation) means the indefinite future. Rules can
|
||||
describe times that are not representable as time values, with
|
||||
the unrepresentable times ignored; this allows rules to be
|
||||
portable among hosts with differing time value types.
|
||||
|
||||
UNTILYEAR [MONTH [DAY [TIME]]]
|
||||
The time at which the UTC offset or the rule(s) change
|
||||
for a location. It is specified as a year, a month, a
|
||||
day, and a time of day. If this is specified, the
|
||||
time zone information is generated from the given UTC
|
||||
offset and rule change until the time specified. The
|
||||
month, day, and time of day have the same format as
|
||||
the IN, ON, and AT fields of a rule; trailing fields
|
||||
can be omitted, and default to the earliest possible
|
||||
value for the missing fields.
|
||||
TO Gives the final year in which the rule applies. In addition to
|
||||
minimum and maximum (as above), the word only (or an
|
||||
abbreviation) may be used to repeat the value of the FROM
|
||||
field.
|
||||
|
||||
The next line must be a "continuation" line; this has
|
||||
the same form as a zone line except that the string
|
||||
"Zone" and the name are omitted, as the continuation
|
||||
line will place information starting at the time
|
||||
specified as the "until" information in the previous
|
||||
line in the file used by the previous line.
|
||||
Continuation lines may contain "until" information,
|
||||
just as zone lines do, indicating that the next line
|
||||
is a further continuation.
|
||||
- Is a reserved field and should always contain "-" for
|
||||
compatibility with older versions of zic. It was previously
|
||||
known as the TYPE field, which could contain values to allow a
|
||||
separate script to further restrict in which "types" of years
|
||||
the rule would apply.
|
||||
|
||||
A link line has the form
|
||||
IN Names the month in which the rule takes effect. Month names
|
||||
may be abbreviated.
|
||||
|
||||
Link LINK-FROM LINK-TO
|
||||
ON Gives the day on which the rule takes effect. Recognized forms
|
||||
include:
|
||||
|
||||
For example:
|
||||
5 the fifth of the month
|
||||
lastSun the last Sunday in the month
|
||||
lastMon the last Monday in the month
|
||||
Sun>=8 first Sunday on or after the eighth
|
||||
Sun<=25 last Sunday on or before the 25th
|
||||
|
||||
Link Europe/Istanbul Asia/Istanbul
|
||||
A weekday name (e.g., Sunday) or a weekday name preceded by
|
||||
"last" (e.g., lastSunday) may be abbreviated or spelled out in
|
||||
full. There must be no white space characters within the ON
|
||||
field. The "<=" and ">=" constructs can result in a day in the
|
||||
neighboring month; for example, the IN-ON combination "Oct
|
||||
Sun>=31" stands for the first Sunday on or after October 31,
|
||||
even if that Sunday occurs in November.
|
||||
|
||||
The LINK-FROM field should appear as the NAME field in some
|
||||
zone line; the LINK-TO field is used as an alternate name
|
||||
for that zone.
|
||||
AT Gives the time of day at which the rule takes effect, relative
|
||||
to 00:00, the start of a calendar day. Recognized forms
|
||||
include:
|
||||
|
||||
Except for continuation lines, lines may appear in any order
|
||||
in the input.
|
||||
2 time in hours
|
||||
2:00 time in hours and minutes
|
||||
01:28:14 time in hours, minutes, and seconds
|
||||
00:19:32.13 time with fractional seconds
|
||||
12:00 midday, 12 hours after 00:00
|
||||
15:00 3 PM, 15 hours after 00:00
|
||||
24:00 end of day, 24 hours after 00:00
|
||||
260:00 260 hours after 00:00
|
||||
-2:30 2.5 hours before 00:00
|
||||
- equivalent to 0
|
||||
|
||||
Lines in the file that describes leap seconds have the
|
||||
following form:
|
||||
Although zic rounds times to the nearest integer second
|
||||
(breaking ties to the even integer), the fractions may be
|
||||
useful to other applications requiring greater precision. The
|
||||
source format does not specify any maximum precision. Any of
|
||||
these forms may be followed by the letter w if the given time
|
||||
is local or "wall clock" time, s if the given time is standard
|
||||
time without any adjustment for daylight saving, or u (or g or
|
||||
z) if the given time is universal time; in the absence of an
|
||||
indicator, local (wall clock) time is assumed. These forms
|
||||
ignore leap seconds; for example, if a leap second occurs at
|
||||
00:59:60 local time, "1:00" stands for 3601 seconds after local
|
||||
midnight instead of the usual 3600 seconds. The intent is that
|
||||
a rule line describes the instants when a clock/calendar set to
|
||||
the type of time specified in the AT field would show the
|
||||
specified date and time of day.
|
||||
|
||||
Leap YEAR MONTH DAY HH:MM:SS CORR R/S
|
||||
SAVE Gives the amount of time to be added to local standard time
|
||||
when the rule is in effect, and whether the resulting time is
|
||||
standard or daylight saving. This field has the same format as
|
||||
the AT field except with a different set of suffix letters: s
|
||||
for standard time and d for daylight saving time. The suffix
|
||||
letter is typically omitted, and defaults to s if the offset is
|
||||
zero and to d otherwise. Negative offsets are allowed; in
|
||||
Ireland, for example, daylight saving time is observed in
|
||||
winter and has a negative offset relative to Irish Standard
|
||||
Time. The offset is merely added to standard time; for
|
||||
example, zic does not distinguish a 10:30 standard time plus an
|
||||
0:30 SAVE from a 10:00 standard time plus a 1:00 SAVE.
|
||||
|
||||
For example:
|
||||
LETTER/S
|
||||
Gives the "variable part" (for example, the "S" or "D" in "EST"
|
||||
or "EDT") of time zone abbreviations to be used when this rule
|
||||
is in effect. If this field is "-", the variable part is null.
|
||||
|
||||
Leap 1974 Dec 31 23:59:60 + S
|
||||
A zone line has the form
|
||||
|
||||
The YEAR, MONTH, DAY, and HH:MM:SS fields tell when the leap
|
||||
second happened. The CORR field should be "+" if a second
|
||||
was added or "-" if a second was skipped. The R/S field
|
||||
should be (an abbreviation of) "Stationary" if the leap
|
||||
second time given by the other fields should be interpreted
|
||||
as UTC or (an abbreviation of) "Rolling" if the leap second
|
||||
time given by the other fields should be interpreted as
|
||||
local wall clock time.
|
||||
Zone NAME STDOFF RULES FORMAT [UNTIL]
|
||||
|
||||
For example:
|
||||
|
||||
Zone Asia/Amman 2:00 Jordan EE%sT 2017 Oct 27 01:00
|
||||
|
||||
The fields that make up a zone line are:
|
||||
|
||||
NAME The name of the timezone. This is the name used in creating the
|
||||
time conversion information file for the timezone. It should not
|
||||
contain a file name component "." or ".."; a file name component
|
||||
is a maximal substring that does not contain "/".
|
||||
|
||||
STDOFF
|
||||
The amount of time to add to UT to get standard time, without any
|
||||
adjustment for daylight saving. This field has the same format
|
||||
as the AT and SAVE fields of rule lines, except without suffix
|
||||
letters; begin the field with a minus sign if time must be
|
||||
subtracted from UT.
|
||||
|
||||
RULES The name of the rules that apply in the timezone or,
|
||||
alternatively, a field in the same format as a rule-line SAVE
|
||||
column, giving the amount of time to be added to local standard
|
||||
time and whether the resulting time is standard or daylight
|
||||
saving. If this field is - then standard time always applies.
|
||||
When an amount of time is given, only the sum of standard time
|
||||
and this amount matters.
|
||||
|
||||
FORMAT
|
||||
The format for time zone abbreviations. The pair of characters
|
||||
%s is used to show where the "variable part" of the time zone
|
||||
abbreviation goes. Alternatively, a format can use the pair of
|
||||
characters %z to stand for the UT offset in the form +-hh,
|
||||
+-hhmm, or +-hhmmss, using the shortest form that does not lose
|
||||
information, where hh, mm, and ss are the hours, minutes, and
|
||||
seconds east (+) or west (-) of UT. Alternatively, a slash (/)
|
||||
separates standard and daylight abbreviations. To conform to
|
||||
POSIX, a time zone abbreviation should contain only alphanumeric
|
||||
ASCII characters, "+" and "-". By convention, the time zone
|
||||
abbreviation "-00" is a placeholder that means local time is
|
||||
unspecified.
|
||||
|
||||
UNTIL The time at which the UT offset or the rule(s) change for a
|
||||
location. It takes the form of one to four fields YEAR [MONTH
|
||||
[DAY [TIME]]]. If this is specified, the time zone information
|
||||
is generated from the given UT offset and rule change until the
|
||||
time specified, which is interpreted using the rules in effect
|
||||
just before the transition. The month, day, and time of day have
|
||||
the same format as the IN, ON, and AT fields of a rule; trailing
|
||||
fields can be omitted, and default to the earliest possible value
|
||||
for the missing fields.
|
||||
|
||||
The next line must be a "continuation" line; this has the same
|
||||
form as a zone line except that the string "Zone" and the name
|
||||
are omitted, as the continuation line will place information
|
||||
starting at the time specified as the "until" information in the
|
||||
previous line in the file used by the previous line.
|
||||
Continuation lines may contain "until" information, just as zone
|
||||
lines do, indicating that the next line is a further
|
||||
continuation.
|
||||
|
||||
If a zone changes at the same instant that a rule would otherwise take
|
||||
effect in the earlier zone or continuation line, the rule is ignored.
|
||||
A zone or continuation line L with a named rule set starts with
|
||||
standard time by default: that is, any of L's timestamps preceding L's
|
||||
earliest rule use the rule in effect after L's first transition into
|
||||
standard time. In a single zone it is an error if two rules take
|
||||
effect at the same instant, or if two zone changes take effect at the
|
||||
same instant.
|
||||
|
||||
If a continuation line subtracts N seconds from the UT offset after a
|
||||
transition that would be interpreted to be later if using the
|
||||
continuation line's UT offset and rules, the "until" time of the
|
||||
previous zone or continuation line is interpreted according to the
|
||||
continuation line's UT offset and rules, and any rule that would
|
||||
otherwise take effect in the next N seconds is instead assumed to take
|
||||
effect simultaneously. For example:
|
||||
|
||||
# Rule NAME FROM TO - IN ON AT SAVE LETTER/S
|
||||
Rule US 1967 2006 - Oct lastSun 2:00 0 S
|
||||
Rule US 1967 1973 - Apr lastSun 2:00 1:00 D
|
||||
# Zone NAME STDOFF RULES FORMAT [UNTIL]
|
||||
Zone America/Menominee -5:00 - EST 1973 Apr 29 2:00
|
||||
-6:00 US C%sT
|
||||
|
||||
Here, an incorrect reading would be there were two clock changes on
|
||||
1973-04-29, the first from 02:00 EST (-05) to 01:00 CST (-06), and the
|
||||
second an hour later from 02:00 CST (-06) to 03:00 CDT (-05). However,
|
||||
zic interprets this more sensibly as a single transition from 02:00 CST
|
||||
(-05) to 02:00 CDT (-05).
|
||||
|
||||
A link line has the form
|
||||
|
||||
Link TARGET LINK-NAME
|
||||
|
||||
For example:
|
||||
|
||||
Link Europe/Istanbul Asia/Istanbul
|
||||
|
||||
The TARGET field should appear as the NAME field in some zone line.
|
||||
The LINK-NAME field is used as an alternative name for that zone; it
|
||||
has the same syntax as a zone line's NAME field.
|
||||
|
||||
Except for continuation lines, lines may appear in any order in the
|
||||
input. However, the behavior is unspecified if multiple zone or link
|
||||
lines define the same name, or if the source of one link line is the
|
||||
target of another.
|
||||
|
||||
The file that describes leap seconds can have leap lines and an
|
||||
expiration line. Leap lines have the following form:
|
||||
|
||||
Leap YEAR MONTH DAY HH:MM:SS CORR R/S
|
||||
|
||||
For example:
|
||||
|
||||
Leap 2016 Dec 31 23:59:60 + S
|
||||
|
||||
The YEAR, MONTH, DAY, and HH:MM:SS fields tell when the leap second
|
||||
happened. The CORR field should be "+" if a second was added or "-" if
|
||||
a second was skipped. The R/S field should be (an abbreviation of)
|
||||
"Stationary" if the leap second time given by the other fields should
|
||||
be interpreted as UTC or (an abbreviation of) "Rolling" if the leap
|
||||
second time given by the other fields should be interpreted as local
|
||||
(wall clock) time.
|
||||
|
||||
Rolling leap seconds were implemented back when it was not clear
|
||||
whether common practice was rolling or stationary, with concerns that
|
||||
one would see Times Square ball drops where there'd be a "3... 2...
|
||||
1... leap... Happy New Year" countdown, placing the leap second at
|
||||
midnight New York time rather than midnight UTC. However, this
|
||||
countdown style does not seem to have caught on, which means rolling
|
||||
leap seconds are not used in practice; also, they are not supported if
|
||||
the -r option is used.
|
||||
|
||||
The expiration line, if present, has the form:
|
||||
|
||||
Expires YEAR MONTH DAY HH:MM:SS
|
||||
|
||||
For example:
|
||||
|
||||
Expires 2020 Dec 28 00:00:00
|
||||
|
||||
The YEAR, MONTH, DAY, and HH:MM:SS fields give the expiration timestamp
|
||||
in UTC for the leap second table.
|
||||
|
||||
EXTENDED EXAMPLE
|
||||
Here is an extended example of zic input, intended to
|
||||
illustrate many of its features.
|
||||
Here is an extended example of zic input, intended to illustrate many
|
||||
of its features.
|
||||
|
||||
# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
|
||||
Rule Swiss 1940 only - Nov 2 0:00 1:00 S
|
||||
Rule Swiss 1940 only - Dec 31 0:00 0 -
|
||||
Rule Swiss 1941 1942 - May Sun>=1 2:00 1:00 S
|
||||
Rule Swiss 1941 1942 - Oct Sun>=1 0:00 0
|
||||
Rule EU 1977 1980 - Apr Sun>=1 1:00u 1:00 S
|
||||
Rule EU 1977 only - Sep lastSun 1:00u 0 -
|
||||
Rule EU 1978 only - Oct 1 1:00u 0 -
|
||||
Rule EU 1979 1995 - Sep lastSun 1:00u 0 -
|
||||
Rule EU 1981 max - Mar lastSun 1:00u 1:00 S
|
||||
Rule EU 1996 max - Oct lastSun 1:00u 0 -
|
||||
# Rule NAME FROM TO - IN ON AT SAVE LETTER/S
|
||||
Rule Swiss 1941 1942 - May Mon>=1 1:00 1:00 S
|
||||
Rule Swiss 1941 1942 - Oct Mon>=1 2:00 0 -
|
||||
Rule EU 1977 1980 - Apr Sun>=1 1:00u 1:00 S
|
||||
Rule EU 1977 only - Sep lastSun 1:00u 0 -
|
||||
Rule EU 1978 only - Oct 1 1:00u 0 -
|
||||
Rule EU 1979 1995 - Sep lastSun 1:00u 0 -
|
||||
Rule EU 1981 max - Mar lastSun 1:00u 1:00 S
|
||||
Rule EU 1996 max - Oct lastSun 1:00u 0 -
|
||||
|
||||
# Zone NAME GMTOFF RULES FORMAT UNTIL
|
||||
Zone Europe/Zurich 0:34:08 - LMT 1848 Sep 12
|
||||
0:29:44 - BMT 1894 Jun
|
||||
1:00 Swiss CE%sT 1981
|
||||
1:00 EU CE%sT
|
||||
# Zone NAME STDOFF RULES FORMAT [UNTIL]
|
||||
Zone Europe/Zurich 0:34:08 - LMT 1853 Jul 16
|
||||
0:29:45.50 - BMT 1894 Jun
|
||||
1:00 Swiss CE%sT 1981
|
||||
1:00 EU CE%sT
|
||||
|
||||
Link Europe/Zurich Switzerland
|
||||
Link Europe/Zurich Europe/Vaduz
|
||||
|
||||
In this example, the zone is named Europe/Zurich but it has
|
||||
an alias as Switzerland. Zurich was 34 minutes and 8
|
||||
seconds west of GMT until 1848-09-12 at 00:00, when the
|
||||
offset changed to 29 minutes and 44 seconds. After
|
||||
1894-06-01 at 00:00 Swiss daylight saving rules (defined
|
||||
with lines beginning with "Rule Swiss") apply, and the GMT
|
||||
offset became one hour. From 1981 to the present, EU
|
||||
daylight saving rules have applied, and the UTC offset has
|
||||
remained at one hour.
|
||||
In this example, the EU rules are for the European Union and for its
|
||||
predecessor organization, the European Communities. The timezone is
|
||||
named Europe/Zurich and it has the alias Europe/Vaduz. This example
|
||||
says that Zurich was 34 minutes and 8 seconds east of UT until
|
||||
1853-07-16 at 00:00, when the legal offset was changed to 7 degrees 26
|
||||
minutes 22.50 seconds, which works out to 0:29:45.50; zic treats this
|
||||
by rounding it to 0:29:46. After 1894-06-01 at 00:00 the UT offset
|
||||
became one hour and Swiss daylight saving rules (defined with lines
|
||||
beginning with "Rule Swiss") apply. From 1981 to the present, EU
|
||||
daylight saving rules have applied, and the UTC offset has remained at
|
||||
one hour.
|
||||
|
||||
In 1940, daylight saving time applied from November 2 at
|
||||
00:00 to December 31 at 00:00. In 1941 and 1942, daylight
|
||||
saving time applied from the first Sunday in May at 02:00 to
|
||||
the first Sunday in October at 00:00. The pre-1981 EU
|
||||
daylight-saving rules have no effect here, but are included
|
||||
for completeness. Since 1981, daylight saving has begun on
|
||||
the last Sunday in March at 01:00 UTC. Until 1995 it ended
|
||||
the last Sunday in September at 01:00 UTC, but this changed
|
||||
to the last Sunday in October starting in 1996.
|
||||
In 1941 and 1942, daylight saving time applied from the first Monday in
|
||||
May at 01:00 to the first Monday in October at 02:00. The pre-1981 EU
|
||||
daylight-saving rules have no effect here, but are included for
|
||||
completeness. Since 1981, daylight saving has begun on the last Sunday
|
||||
in March at 01:00 UTC. Until 1995 it ended the last Sunday in
|
||||
September at 01:00 UTC, but this changed to the last Sunday in October
|
||||
starting in 1996.
|
||||
|
||||
For purposes of display, "LMT" and "BMT" were initially
|
||||
used, respectively. Since Swiss rules and later EU rules
|
||||
were applied, the display name for the timezone has been CET
|
||||
for standard time and CEST for daylight saving time.
|
||||
For purposes of display, "LMT" and "BMT" were initially used,
|
||||
respectively. Since Swiss rules and later EU rules were applied, the
|
||||
time zone abbreviation has been CET for standard time and CEST for
|
||||
daylight saving time.
|
||||
|
||||
FILES
|
||||
/etc/localtime
|
||||
Default local timezone file.
|
||||
|
||||
/usr/share/zoneinfo
|
||||
Default timezone information directory.
|
||||
|
||||
NOTES
|
||||
For areas with more than two types of local time, you may
|
||||
need to use local standard time in the AT field of the
|
||||
earliest transition time's rule to ensure that the earliest
|
||||
transition time recorded in the compiled file is correct.
|
||||
For areas with more than two types of local time, you may need to use
|
||||
local standard time in the AT field of the earliest transition time's
|
||||
rule to ensure that the earliest transition time recorded in the
|
||||
compiled file is correct.
|
||||
|
||||
If, for a particular zone, a clock advance caused by the
|
||||
start of daylight saving coincides with and is equal to a
|
||||
clock retreat caused by a change in UTC offset, zic produces
|
||||
a single transition to daylight saving at the new UTC offset
|
||||
(without any change in wall clock time). To get separate
|
||||
transitions use multiple zone continuation lines specifying
|
||||
transition instants using universal time.
|
||||
|
||||
FILE
|
||||
/usr/local/etc/zoneinfo standard directory used for
|
||||
created files
|
||||
If, for a particular timezone, a clock advance caused by the start of
|
||||
daylight saving coincides with and is equal to a clock retreat caused
|
||||
by a change in UT offset, zic produces a single transition to daylight
|
||||
saving at the new UT offset without any change in local (wall clock)
|
||||
time. To get separate transitions use multiple zone continuation lines
|
||||
specifying transition instants using universal time.
|
||||
|
||||
SEE ALSO
|
||||
newctime(3), tzfile(5), zdump(8)
|
||||
tzfile(5), zdump(8)
|
||||
|
||||
ZIC(8)
|
||||
|
@ -1,54 +0,0 @@
|
||||
#! /usr/bin/perl -w
|
||||
|
||||
# @(#)zoneinfo2tdf.pl 8.2
|
||||
|
||||
# Courtesy Ken Pizzini.
|
||||
|
||||
use strict;
|
||||
|
||||
#This file released to the public domain.
|
||||
|
||||
#Note: error checking is poor --- only trust the output if the input
|
||||
#has been checked by zic.
|
||||
|
||||
my $contZone = '';
|
||||
while (<>) {
|
||||
my $origline = $_;
|
||||
my @fields = ();
|
||||
while (s/^\s*((?:"[^"]*"|[^\s#])+)//) {
|
||||
push @fields, $1;
|
||||
}
|
||||
next unless @fields;
|
||||
|
||||
my $type = lc($fields[0]);
|
||||
if ($contZone) {
|
||||
@fields >= 3 or warn "bad continuation line";
|
||||
unshift @fields, '+', $contZone;
|
||||
$type = 'zone';
|
||||
}
|
||||
|
||||
$contZone = '';
|
||||
if ($type eq 'zone') {
|
||||
# Zone NAME GMTOFF RULES/SAVE FORMAT [UNTIL]
|
||||
my $nfields = @fields;
|
||||
$nfields >= 5 or warn "bad zone line";
|
||||
if ($nfields > 6) {
|
||||
#this splice is optional, depending on one's preference
|
||||
#(one big date-time field, or componentized date and time):
|
||||
splice(@fields, 5, $nfields-5, "@fields[5..$nfields-1]");
|
||||
}
|
||||
$contZone = $fields[1] if @fields > 5;
|
||||
} elsif ($type eq 'rule') {
|
||||
# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
|
||||
@fields == 10 or warn "bad rule line";
|
||||
} elsif ($type eq 'link') {
|
||||
# Link LINK-FROM LINK-TO
|
||||
@fields == 3 or warn "bad link line";
|
||||
} elsif ($type eq 'leap') {
|
||||
# Leap YEAR MONTH DAY HH:MM:SS CORR R/S
|
||||
@fields == 7 or warn "bad leap line";
|
||||
} else {
|
||||
warn "Fubar at input line $.: $origline";
|
||||
}
|
||||
print join("\t", @fields), "\n";
|
||||
}
|
Loading…
Reference in New Issue
Block a user