<div dir="ltr"><div><div>> I took the liberty of removing the copy of the
IERS announcement<br>> from the generated 'leapseconds' since its copyright
status was unclear.<br><br></div>I've sent a suggestion to the IERS to include copyright status information in their notices;<br>we'll see what happens. (If anyone on the list believes it's worthwhile and has weight with them...)<br>
<br></div> --ado<br></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Aug 13, 2013 at 3:07 AM, Paul Eggert <span dir="ltr"><<a href="mailto:eggert@cs.ucla.edu" target="_blank">eggert@cs.ucla.edu</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Bradley White privately sent a Perl script to generate<br>
'leapseconds' from the NIST leap-seconds.list file.<br>
Since we use POSIX Awk for the other processing<br>
it's probably better to use Awk here, too, so here's a proposed<br>
patch with all the Makefile bells and whistles, which I pushed<br>
to the experimental github repository. The patch removes the<br>
file 'leapseconds' from the repository because it's now generated<br>
automatically. I took the liberty of removing the copy of the<br>
IERS announcement from the generated 'leapseconds' since its copyright<br>
status was unclear. The NIST leap-seconds.list file is public domain,<br>
so it's OK for us to redistribute it.<br>
<br>
>From 459b72d3edec98488e5132d4473c4678b4ed5a73 Mon Sep 17 00:00:00 2001<br>
From: Paul Eggert <<a href="mailto:eggert@cs.ucla.edu">eggert@cs.ucla.edu</a>><br>
Date: Mon, 12 Aug 2013 23:58:29 -0700<br>
Subject: [PATCH] Generate the 'leapseconds' file automatically from<br>
leap-seconds.list.<br>
<br>
* leap-seconds.list: New file, copied from the NIST.<br>
* leapseconds: Remove from git; it's now generated.<br>
* leapseconds.awk: New file.<br>
* Makefile (DATA): Add leap-seconds.list. Remove leapseconds.<br>
(MISC): Add leapseconds.awk.<br>
(leapseconds): New rule.<br>
(right_posix, posix_right): Depend on leapseconds.<br>
(clean_misc): Remove leapseconds.<br>
---<br>
Makefile | 14 ++--<br>
leap-seconds.list | 231 ++++++++++++++++++++++++++++++++++++++++++++++++++++++<br>
leapseconds | 100 -----------------------<br>
leapseconds.awk | 68 ++++++++++++++++<br>
4 files changed, 308 insertions(+), 105 deletions(-)<br>
create mode 100644 leap-seconds.list<br>
delete mode 100644 leapseconds<br>
create mode 100644 leapseconds.awk<br>
<br>
diff --git a/Makefile b/Makefile<br>
index db7f56e..68d7132 100644<br>
--- a/Makefile<br>
+++ b/Makefile<br>
@@ -318,10 +318,11 @@ NDATA= systemv factory<br>
SDATA= solar87 solar88 solar89<br>
TDATA= $(YDATA) $(NDATA) $(SDATA)<br>
TABDATA= iso3166.tab zone.tab<br>
-DATA= $(YDATA) $(NDATA) $(SDATA) $(TABDATA) leapseconds yearistype.sh<br>
+DATA= $(YDATA) $(NDATA) $(SDATA) $(TABDATA) \<br>
+ leap-seconds.list yearistype.sh<br>
WEB_PAGES= tz-art.htm tz-link.htm<br>
MISC= usno1988 usno1989 usno1989a usno1995 usno1997 usno1998 \<br>
- $(WEB_PAGES) checktab.awk workman.sh \<br>
+ $(WEB_PAGES) checktab.awk leapseconds.awk workman.sh \<br>
<a href="http://zoneinfo2tdf.pl" target="_blank">zoneinfo2tdf.pl</a><br>
ENCHILADA= $(COMMON) $(DOCS) $(SOURCES) $(DATA) $(MISC)<br>
<br>
@@ -375,6 +376,9 @@ yearistype: yearistype.sh<br>
cp yearistype.sh yearistype<br>
chmod +x yearistype<br>
<br>
+leapseconds: leapseconds.awk leap-seconds.list<br>
+ $(AWK) -f leapseconds.awk leap-seconds.list >$@<br>
+<br>
posix_only: zic $(TDATA)<br>
$(ZIC) -y $(YEARISTYPE) -d $(TZDIR) -L /dev/null $(TDATA)<br>
<br>
@@ -390,14 +394,14 @@ right_only: zic leapseconds $(TDATA)<br>
# Therefore, the other two directories are now siblings of $(TZDIR).<br>
# You must replace all of $(TZDIR) to switch from not using leap seconds<br>
# to using them, or vice versa.<br>
-right_posix: right_only<br>
+right_posix: right_only leapseconds<br>
rm -fr $(TZDIR)-leaps<br>
ln -s $(TZDIR_BASENAME) $(TZDIR)-leaps || \<br>
$(ZIC) -y $(YEARISTYPE) \<br>
-d $(TZDIR)-leaps -L leapseconds $(TDATA)<br>
$(ZIC) -y $(YEARISTYPE) -d $(TZDIR)-posix -L /dev/null $(TDATA)<br>
<br>
-posix_right: posix_only<br>
+posix_right: posix_only leapseconds<br>
rm -fr $(TZDIR)-posix<br>
ln -s $(TZDIR_BASENAME) $(TZDIR)-posix || \<br>
$(ZIC) -y $(YEARISTYPE) \<br>
@@ -440,7 +444,7 @@ check_web: $(WEB_PAGES)<br>
<br>
clean_misc:<br>
rm -f core *.o *.out \<br>
- date tzselect version.h zdump zic yearistype<br>
+ date leapseconds tzselect version.h zdump zic yearistype<br>
clean: clean_misc<br>
rm -f -r tzpublic<br>
<br>
diff --git a/leap-seconds.list b/leap-seconds.list<br>
new file mode 100644<br>
index 0000000..7df3de6<br>
--- /dev/null<br>
+++ b/leap-seconds.list<br>
@@ -0,0 +1,231 @@<br>
+#<br>
+# In the following text, the symbol '#' introduces<br>
+# a comment, which continues from that symbol until<br>
+# the end of the line. A plain comment line has a<br>
+# whitespace character following the comment indicator.<br>
+# There are also special comment lines defined below.<br>
+# A special comment will always have a non-whitespace<br>
+# character in column 2.<br>
+#<br>
+# A blank line should be ignored.<br>
+#<br>
+# The following table shows the corrections that must<br>
+# be applied to compute International Atomic Time (TAI)<br>
+# from the Coordinated Universal Time (UTC) values that<br>
+# are transmitted by almost all time services.<br>
+#<br>
+# The first column shows an epoch as a number of seconds<br>
+# since 1900.0 and the second column shows the number of<br>
+# seconds that must be added to UTC to compute TAI for<br>
+# any timestamp at or after that epoch. The value on<br>
+# each line is valid from the indicated initial instant<br>
+# until the epoch given on the next one or indefinitely<br>
+# into the future if there is no next line.<br>
+# (The comment on each line shows the representation of<br>
+# the corresponding initial epoch in the usual<br>
+# day-month-year format. The epoch always begins at<br>
+# 00:00:00 UTC on the indicated day. See Note 5 below.)<br>
+#<br>
+# Important notes:<br>
+#<br>
+# 1. Coordinated Universal Time (UTC) is often referred to<br>
+# as Greenwich Mean Time (GMT). The GMT time scale is no<br>
+# longer used, and the use of GMT to designate UTC is<br>
+# discouraged.<br>
+#<br>
+# 2. The UTC time scale is realized by many national<br>
+# laboratories and timing centers. Each laboratory<br>
+# identifies its realization with its name: Thus<br>
+# UTC(NIST), UTC(USNO), etc. The differences among<br>
+# these different realizations are typically on the<br>
+# order of a few nanoseconds (i.e., 0.000 000 00x s)<br>
+# and can be ignored for many purposes. These differences<br>
+# are tabulated in Circular T, which is published monthly<br>
+# by the International Bureau of Weights and Measures<br>
+# (BIPM). See <a href="http://www.bipm.fr" target="_blank">www.bipm.fr</a> for more information.<br>
+#<br>
+# 3. The current defintion of the relationship between UTC<br>
+# and TAI dates from 1 January 1972. A number of different<br>
+# time scales were in use before than epoch, and it can be<br>
+# quite difficult to compute precise timestamps and time<br>
+# intervals in those "prehistoric" days. For more information,<br>
+# consult:<br>
+#<br>
+# The Explanatory Supplement to the Astronomical<br>
+# Ephemeris.<br>
+# or<br>
+# Terry Quinn, "The BIPM and the Accurate Measurement<br>
+# of Time," Proc. of the IEEE, Vol. 79, pp. 894-905,<br>
+# July, 1991.<br>
+#<br>
+# 4. The insertion of leap seconds into UTC is currently the<br>
+# responsibility of the International Earth Rotation Service,<br>
+# which is located at the Paris Observatory:<br>
+#<br>
+# Central Bureau of IERS<br>
+# 61, Avenue de l'Observatoire<br>
+# 75014 Paris, France.<br>
+#<br>
+# Leap seconds are announced by the IERS in its Bulletin C<br>
+#<br>
+# See <a href="http://hpiers.obspm.fr" target="_blank">hpiers.obspm.fr</a> or <a href="http://www.iers.org" target="_blank">www.iers.org</a> for more details.<br>
+#<br>
+# All national laboratories and timing centers use the<br>
+# data from the BIPM and the IERS to construct their<br>
+# local realizations of UTC.<br>
+#<br>
+# Although the definition also includes the possibility<br>
+# of dropping seconds ("negative" leap seconds), this has<br>
+# never been done and is unlikely to be necessary in the<br>
+# foreseeable future.<br>
+#<br>
+# 5. If your system keeps time as the number of seconds since<br>
+# some epoch (e.g., NTP timestamps), then the algorithm for<br>
+# assigning a UTC time stamp to an event that happens during a positive<br>
+# leap second is not well defined. The official name of that leap<br>
+# second is 23:59:60, but there is no way of representing that time<br>
+# in these systems.<br>
+# Many systems of this type effectively stop the system clock for<br>
+# one second during the leap second and use a time that is equivalent<br>
+# to 23:59:59 UTC twice. For these systems, the corresponding TAI<br>
+# timestamp would be obtained by advancing to the next entry in the<br>
+# following table when the time equivalent to 23:59:59 UTC<br>
+# is used for the second time. Thus the leap second which<br>
+# occurred on 30 June 1972 at 23:59:59 UTC would have TAI<br>
+# timestamps computed as follows:<br>
+#<br>
+# ...<br>
+# 30 June 1972 23:59:59 (2287785599, first time): TAI= UTC + 10 seconds<br>
+# 30 June 1972 23:59:60 (2287785599,second time): TAI= UTC + 11 seconds<br>
+# 1 July 1972 00:00:00 (2287785600) TAI= UTC + 11 seconds<br>
+# ...<br>
+#<br>
+# If your system realizes the leap second by repeating 00:00:00 UTC twice<br>
+# (this is possible but not usual), then the advance to the next entry<br>
+# in the table must occur the second time that a time equivlent to<br>
+# 00:00:00 UTC is used. Thus, using the same example as above:<br>
+#<br>
+# ...<br>
+# 30 June 1972 23:59:59 (2287785599): TAI= UTC + 10 seconds<br>
+# 30 June 1972 23:59:60 (2287785600, first time): TAI= UTC + 10 seconds<br>
+# 1 July 1972 00:00:00 (2287785600,second time): TAI= UTC + 11 seconds<br>
+# ...<br>
+#<br>
+# in both cases the use of timestamps based on TAI produces a smooth<br>
+# time scale with no discontinuity in the time interval.<br>
+#<br>
+# This complexity would not be needed for negative leap seconds (if they<br>
+# are ever used). The UTC time would skip 23:59:59 and advance from<br>
+# 23:59:58 to 00:00:00 in that case. The TAI offset would decrease by<br>
+# 1 second at the same instant. This is a much easier situation to deal<br>
+# with, since the difficulty of unambiguously representing the epoch<br>
+# during the leap second does not arise.<br>
+#<br>
+# Questions or comments to:<br>
+# Judah Levine<br>
+# Time and Frequency Division<br>
+# NIST<br>
+# Boulder, Colorado<br>
+# <a href="mailto:jlevine@boulder.nist.gov">jlevine@boulder.nist.gov</a><br>
+#<br>
+# Last Update of leap second values: 11 January 2012<br>
+#<br>
+# The following line shows this last update date in NTP timestamp<br>
+# format. This is the date on which the most recent change to<br>
+# the leap second data was added to the file. This line can<br>
+# be identified by the unique pair of characters in the first two<br>
+# columns as shown below.<br>
+#<br>
+#$ 3535228800<br>
+#<br>
+# The NTP timestamps are in units of seconds since the NTP epoch,<br>
+# which is 1900.0. The Modified Julian Day number corresponding<br>
+# to the NTP time stamp, X, can be computed as<br>
+#<br>
+# X/86400 + 15020<br>
+#<br>
+# where the first term converts seconds to days and the second<br>
+# term adds the MJD corresponding to 1900.0. The integer portion<br>
+# of the result is the integer MJD for that day, and any remainder<br>
+# is the time of day, expressed as the fraction of the day since 0<br>
+# hours UTC. The conversion from day fraction to seconds or to<br>
+# hours, minutes, and seconds may involve rounding or truncation,<br>
+# depending on the method used in the computation.<br>
+#<br>
+# The data in this file will be updated periodically as new leap<br>
+# seconds are announced. In addition to being entered on the line<br>
+# above, the update time (in NTP format) will be added to the basic<br>
+# file name leap-seconds to form the name leap-seconds.<NTP TIME>.<br>
+# In addition, the generic name leap-seconds.list will always point to<br>
+# the most recent version of the file.<br>
+#<br>
+# This update procedure will be performed only when a new leap second<br>
+# is announced.<br>
+#<br>
+# The following entry specifies the expiration date of the data<br>
+# in this file in units of seconds since 1900.0. This expiration date<br>
+# will be changed at least twice per year whether or not a new leap<br>
+# second is announced. These semi-annual changes will be made no<br>
+# later than 1 June and 1 December of each year to indicate what<br>
+# action (if any) is to be taken on 30 June and 31 December,<br>
+# respectively. (These are the customary effective dates for new<br>
+# leap seconds.) This expiration date will be identified by a<br>
+# unique pair of characters in columns 1 and 2 as shown below.<br>
+# In the unlikely event that a leap second is announced with an<br>
+# effective date other than 30 June or 31 December, then this<br>
+# file will be edited to include that leap second as soon as it is<br>
+# announced or at least one month before the effective date<br>
+# (whichever is later).<br>
+# If an announcement by the IERS specifies that no leap second is<br>
+# scheduled, then only the expiration date of the file will<br>
+# be advanced to show that the information in the file is still<br>
+# current -- the update time stamp, the data and the name of the file<br>
+# will not change.<br>
+#<br>
+# Updated through IERS Bulletin C46<br>
+# File expires on: 28 June 2014<br>
+#<br>
+#@ 3612902400<br>
+#<br>
+2272060800 10 # 1 Jan 1972<br>
+2287785600 11 # 1 Jul 1972<br>
+2303683200 12 # 1 Jan 1973<br>
+2335219200 13 # 1 Jan 1974<br>
+2366755200 14 # 1 Jan 1975<br>
+2398291200 15 # 1 Jan 1976<br>
+2429913600 16 # 1 Jan 1977<br>
+2461449600 17 # 1 Jan 1978<br>
+2492985600 18 # 1 Jan 1979<br>
+2524521600 19 # 1 Jan 1980<br>
+2571782400 20 # 1 Jul 1981<br>
+2603318400 21 # 1 Jul 1982<br>
+2634854400 22 # 1 Jul 1983<br>
+2698012800 23 # 1 Jul 1985<br>
+2776982400 24 # 1 Jan 1988<br>
+2840140800 25 # 1 Jan 1990<br>
+2871676800 26 # 1 Jan 1991<br>
+2918937600 27 # 1 Jul 1992<br>
+2950473600 28 # 1 Jul 1993<br>
+2982009600 29 # 1 Jul 1994<br>
+3029443200 30 # 1 Jan 1996<br>
+3076704000 31 # 1 Jul 1997<br>
+3124137600 32 # 1 Jan 1999<br>
+3345062400 33 # 1 Jan 2006<br>
+3439756800 34 # 1 Jan 2009<br>
+3550089600 35 # 1 Jul 2012<br>
+#<br>
+# the following special comment contains the<br>
+# hash value of the data in this file computed<br>
+# use the secure hash algorithm as specified<br>
+# by FIPS 180-1. See the files in ~/pub/sha for<br>
+# the details of how this hash value is<br>
+# computed. Note that the hash computation<br>
+# ignores comments and whitespace characters<br>
+# in data lines. It includes the NTP values<br>
+# of both the last modification time and the<br>
+# expiration time of the file, but not the<br>
+# white space on those lines.<br>
+# the hash line is also ignored in the<br>
+# computation.<br>
+#<br>
+#h 1151a8f e85a5069 9000fcdb 3d5e5365 1d505b37<br>
diff --git a/leapseconds b/leapseconds<br>
deleted file mode 100644<br>
index 5b5c70e..0000000<br>
--- a/leapseconds<br>
+++ /dev/null<br>
@@ -1,100 +0,0 @@<br>
-# <pre><br>
-# This file is in the public domain, so clarified as of<br>
-# 2009-05-17 by Arthur David Olson.<br>
-<br>
-# Allowance for leapseconds added to each timezone file.<br>
-<br>
-# The International Earth Rotation Service periodically uses leap seconds<br>
-# to keep UTC to within 0.9 s of UT1<br>
-# (which measures the true angular orientation of the earth in space); see<br>
-# Terry J Quinn, The BIPM and the accurate measure of time,<br>
-# Proc IEEE 79, 7 (July 1991), 894-905.<br>
-# There were no leap seconds before 1972, because the official mechanism<br>
-# accounting for the discrepancy between atomic time and the earth's rotation<br>
-# did not exist until the early 1970s.<br>
-<br>
-# The correction (+ or -) is made at the given time, so lines<br>
-# will typically look like:<br>
-# Leap YEAR MON DAY 23:59:60 + R/S<br>
-# or<br>
-# Leap YEAR MON DAY 23:59:59 - R/S<br>
-<br>
-# If the leapsecond is Rolling (R) the given time is local time<br>
-# If the leapsecond is Stationary (S) the given time is UTC<br>
-<br>
-# Leap YEAR MONTH DAY HH:MM:SS CORR R/S<br>
-Leap 1972 Jun 30 23:59:60 + S<br>
-Leap 1972 Dec 31 23:59:60 + S<br>
-Leap 1973 Dec 31 23:59:60 + S<br>
-Leap 1974 Dec 31 23:59:60 + S<br>
-Leap 1975 Dec 31 23:59:60 + S<br>
-Leap 1976 Dec 31 23:59:60 + S<br>
-Leap 1977 Dec 31 23:59:60 + S<br>
-Leap 1978 Dec 31 23:59:60 + S<br>
-Leap 1979 Dec 31 23:59:60 + S<br>
-Leap 1981 Jun 30 23:59:60 + S<br>
-Leap 1982 Jun 30 23:59:60 + S<br>
-Leap 1983 Jun 30 23:59:60 + S<br>
-Leap 1985 Jun 30 23:59:60 + S<br>
-Leap 1987 Dec 31 23:59:60 + S<br>
-Leap 1989 Dec 31 23:59:60 + S<br>
-Leap 1990 Dec 31 23:59:60 + S<br>
-Leap 1992 Jun 30 23:59:60 + S<br>
-Leap 1993 Jun 30 23:59:60 + S<br>
-Leap 1994 Jun 30 23:59:60 + S<br>
-Leap 1995 Dec 31 23:59:60 + S<br>
-Leap 1997 Jun 30 23:59:60 + S<br>
-Leap 1998 Dec 31 23:59:60 + S<br>
-Leap 2005 Dec 31 23:59:60 + S<br>
-Leap 2008 Dec 31 23:59:60 + S<br>
-Leap 2012 Jun 30 23:59:60 + S<br>
-<br>
-# INTERNATIONAL EARTH ROTATION AND REFERENCE SYSTEMS SERVICE (IERS)<br>
-#<br>
-# SERVICE INTERNATIONAL DE LA ROTATION TERRESTRE ET DES SYSTEMES DE REFERENCE<br>
-#<br>
-#<br>
-# SERVICE DE LA ROTATION TERRESTRE<br>
-# OBSERVATOIRE DE PARIS<br>
-# 61, Av. de l'Observatoire 75014 PARIS (France)<br>
-# Tel. : 33 (0) 1 40 51 22 26<br>
-# FAX : 33 (0) 1 40 51 22 91<br>
-# e-mail : (E-Mail Removed)<br>
-# <a href="http://hpiers.obspm.fr/eop-pc" target="_blank">http://hpiers.obspm.fr/eop-pc</a><br>
-#<br>
-# Paris, 5 January 2012<br>
-#<br>
-#<br>
-# Bulletin C 43<br>
-#<br>
-# To authorities responsible<br>
-# for the measurement and<br>
-# distribution of time<br>
-#<br>
-#<br>
-# UTC TIME STEP<br>
-# on the 1st of July 2012<br>
-#<br>
-#<br>
-# A positive leap second will be introduced at the end of June 2012.<br>
-# The sequence of dates of the UTC second markers will be:<br>
-#<br>
-# 2012 June 30, 23h 59m 59s<br>
-# 2012 June 30, 23h 59m 60s<br>
-# 2012 July 1, 0h 0m 0s<br>
-#<br>
-# The difference between UTC and the International Atomic Time TAI is:<br>
-#<br>
-# from 2009 January 1, 0h UTC, to 2012 July 1 0h UTC : UTC-TAI = - 34s<br>
-# from 2012 July 1, 0h UTC, until further notice : UTC-TAI = - 35s<br>
-#<br>
-# Leap seconds can be introduced in UTC at the end of the months of December<br>
-# or June, depending on the evolution of UT1-TAI. Bulletin C is mailed every<br>
-# six months, either to announce a time step in UTC or to confirm that there<br>
-# will be no time step at the next possible date.<br>
-#<br>
-#<br>
-# Daniel GAMBIS<br>
-# Head<br>
-# Earth Orientation Center of IERS<br>
-# Observatoire de Paris, France<br>
diff --git a/leapseconds.awk b/leapseconds.awk<br>
new file mode 100644<br>
index 0000000..732db99<br>
--- /dev/null<br>
+++ b/leapseconds.awk<br>
@@ -0,0 +1,68 @@<br>
+# Generate the 'leapseconds' file from 'leap-seconds.list'.<br>
+<br>
+# This file is in the public domain.<br>
+<br>
+BEGIN {<br>
+ printf "%s", "\<br>
+# Allowance for leapseconds added to each timezone file.\n\<br>
+\n\<br>
+# This file is in the public domain.\n\<br>
+\n\<br>
+# This file is generated automatically from the data in the public-domain\n\<br>
+# leap-seconds.list file available from most NIST time servers.\n\<br>
+# If the URL <<a href="ftp://time.nist.gov/pub/leap-seconds.list" target="_blank">ftp://time.nist.gov/pub/leap-seconds.list</a>> does not work,\n\<br>
+# you should be able to pick up leap-seconds.list from a secondary NIST server.\n\<br>
+# For more about leap-seconds.list, please see\n\<br>
+# The NTP Timescale and Leap Seconds\n\<br>
+# <<a href="http://www.eecis.udel.edu/~mills/leap.html" target="_blank">http://www.eecis.udel.edu/~mills/leap.html</a>>.\n\<br>
+\n\<br>
+# The International Earth Rotation Service periodically uses leap seconds\n\<br>
+# to keep UTC to within 0.9 s of UT1\n\<br>
+# (which measures the true angular orientation of the earth in space); see\n\<br>
+# Terry J Quinn, The BIPM and the accurate measure of time,\n\<br>
+# Proc IEEE 79, 7 (July 1991), 894-905 <<a href="http://dx.doi.org/10.1109/5.84965" target="_blank">http://dx.doi.org/10.1109/5.84965</a>>.\n\<br>
+# There were no leap seconds before 1972, because the official mechanism\n\<br>
+# accounting for the discrepancy between atomic time and the earth's rotation\n\<br>
+# did not exist until the early 1970s.\n\<br>
+\n\<br>
+# The correction (+ or -) is made at the given time, so lines\n\<br>
+# will typically look like:\n\<br>
+# Leap YEAR MON DAY 23:59:60 + R/S\n\<br>
+# or\n\<br>
+# Leap YEAR MON DAY 23:59:59 - R/S\n\<br>
+\n\<br>
+# If the leapsecond is Rolling (R) the given time is local time.\n\<br>
+# If the leapsecond is Stationary (S) the given time is UTC.\n\<br>
+\n\<br>
+# Leap YEAR MONTH DAY HH:MM:SS CORR R/S\n\<br>
+"<br>
+}<br>
+<br>
+/^ *$/ { next }<br>
+/^#/ { next }<br>
+<br>
+{<br>
+ NTP_timestamp = $1<br>
+ TAI_minus_UTC = $2<br>
+ hash_mark = $3<br>
+ one = $4<br>
+ month = $5<br>
+ year = $6<br>
+ if (old_TAI_minus_UTC) {<br>
+ if (old_TAI_minus_UTC < TAI_minus_UTC) {<br>
+ sign = "23:59:60\t+"<br>
+ } else {<br>
+ sign = "23:59:59\t-"<br>
+ }<br>
+ if (month == "Jan") {<br>
+ year--;<br>
+ month = "Dec";<br>
+ day = 31<br>
+ } else if (month == "Jul") {<br>
+ month = "Jun";<br>
+ day = 30<br>
+ }<br>
+ printf "Leap\t%s\t%s\t%s\t%s\tS\n", year, month, day, sign<br>
+ }<br>
+ old_TAI_minus_UTC = TAI_minus_UTC<br>
+}<br>
<span class="HOEnZb"><font color="#888888">--<br>
1.8.1.2<br>
<br>
<br>
</font></span></blockquote></div><br></div>