Computer time resources
by Markus Kuhn
One of my side-line interests in computing are mechanisms and
standards related to handling time, in particular conventional
complications such as leap seconds and civilian time zones. This page
is my bookmark list on the subject and also lists some work that I
have done in this area.
Time basics
If you are not familiar with concepts such as leap seconds, TAI,
UTC, UT1, then these brief introductory references will help you to
get started:
Excellent more detailed tutorials on the definition of the various
timescales are
- Astronomical Time
by Dennis D. McCarthy, Proc. IEEE, Vol. 79, No. 7, July 1991, pp.
915-920. (see also the other papers in this special issue on time and
frequency standards)
- The
Science of Timekeeping, by David W. Allan, Neil Ashby, Clifford C.
Hodge, Hewlett Packard Application Note 1289, 1997.
Further information is available from various government and
scientific organizations that handle the definition and dissemination
of various aspects of time:
Standards
Leap seconds
Leap seconds were introduced in 1971 to reconcile astronomical
time, which is based on the rotation on the earth, and physical time,
which can me measured with amazing accuracy using atomic clocks.
An in-depth introduction into leap seconds, especially in the
context of recent proposals to get rid of them, is
A consultation process has been underway since 1999, initiated by
several international scientific organizations (ITU, URSI, IAU, etc.),
to study whether the definition of UTC should be modified. In
particular, it has been proposed to remove leap seconds from what is
the basis of almost all regional civilian time zones, effectively
decoupling civilian time keeping from the rotation of the earth. More information ...
Broadcast of standard time
UTC signals are made freely available via various forms of
broadcast:
Application program interfaces
Computer programs access the clock managed by the operating systems
via a standardized application program interface. Existing ones such
as that provided in the ISO C and POSIX standards leave a lot to be
desired, which motivated to write up a
that explores what a comprehensive clock interface for application
programs could look like.
Further references
[This section needs a cleanup.]
- The Olson tz
library is a free implementation of the time functions in the C
standard and comes with a comprehensive and well-maintained database
of time zones.
- Paul Eggert's critical
comments on an older time API proposed in N2620, which were
formally submitted to the ISO C99 committee in N834,
as well as Paul Eggert's response
to the unsatisfactory reply of the US C committee (NCITS/J11/98-048)
on his first comments.
- The POSIX.1 standard defines the Seconds
since the epoch integer encoding of UTC time values, the <time.h>
Unix clock and timer API using it, and the TZ environment variable
a
format for simple timezone descriptor strings.
- The POSIX.2 standard describes the date
command, which provides additional conversion specifiers over those of
the old strftime.
- The International Standard Date and Time
Notation specified in ISO 8601.
- Mills, D.L. Improved
algorithms for synchronizing computer network clocks. IEEE/ACM
Trans. Networks (June 1995), 245-254.
- Mills, D.L. Unix kernel modifications for precision time synchronization.
Electrical Engineering Department Report 94-10-1, University of
Delaware, October 1994, 24 pp. (Defines the
ntp_gettime() and ntp_adjtime()
system calls.)
- Various other papers by David Mills
on NTP and the kernel
PLL.
- A summary of calendar algorithms is Calendrical
Calculations by Nachum Dershowitz and Edward M. Reingold,
Software-Practice and Experience, vol 20, no 9, September 1990, pp
899-928, as well as the book of the same title by these authors
(Cambridge University Press, 1997).
- The IAU's Standards Of
Fundamental Astronomy (SOFA) project published various reference
algorithms for astronomic applications including a couple of calendar
and time-scale conversion functions.
Markus Kuhn