Contents |
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:
- USENET sci.astro FAQ, section C.02
- NIST Time and Frequency Glossary
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:
- U.S. Naval Observatory, Washington D.C.
- Physikalisch-Technische Bundesanstalt (PTB) in Braunschweig, Germany
- National Physical Laboratory (NPL), England
- International Earth Rotation Service (IERS), Paris
- Bureau International des Poids et Mesures, Paris
Standards
- ITU-R Recommendation TF.460-4 defines Coordinated Universal Time (UTC) and how leap seconds are inserted into it. Other relevant ITU-R TF recommendations and drafts are available from the ITU server.
- Leap second table from IERS.
- IAU(1997) Recommendation B1 defines the Julian Date and MJD.
- ISO 8601 specifies the international standard date (YYYY-MM-DD) and time (23:59) notation.
- National time laws:
- Britain: Joseph S. Myers' essay, Lord Tanlaw's proposal to change to UTC in 1997
- Germany: Zeitgesetz of 1978 (English translation)
- European Union: Directive 2000/84/EC of the European Parliament and of the Council of 19 January 2001 on summer-time arrangements, Official Journal L 031, 2001-02-02, pp 21-22.
- France: Seago/Seidelmann quote "Décret no. 78-885 du 9 août 1978, loc. cit. 3080"
- New Zealand: Time Act of 1974
- Switzerland: Zeitgesetz of 1980
- United States: United States Code, Title 15, Chapter 6, Subchapter IX – Standard time
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
- Nelson, McCarthy, et al.: The leap second: its history and possible future, Metrologia, Vol. 38, pp. 509-529, 2001. (PDF made available here with permission, IoP original)
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:
- National physics laboratory low-frequency radio time signals
- US Air Force NAVSTAR Global Positioning System (GPS) satellite constellation
- Internet Network Time Protocol (NTP)
- Various digital radio and TV broadcast standards such as Digital Radio Mondiale (DRM), Radio Data System (RDS), Digital Video Broadcast (DVB), etc.
- many others ...
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.
created 2003-07-01 – last modified 2003-08-12 – http://www.cl.cam.ac.uk/~mgk25/time/