diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2020-01-14 18:15:30 -0800 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2020-01-14 18:15:30 -0800 |
commit | fb434180b191ae0e8d3d17fd7442939d2b563443 (patch) | |
tree | 43b0aa9ea3867d0c06a823c608cf8e2b949e3655 /zic.8 | |
parent | b4cc8501c4dd1064bb87610164b86adb584948ba (diff) | |
download | tz-fb434180b191ae0e8d3d17fd7442939d2b563443.tar.gz |
Add support for Expires lines to zic
* Makefile (EXPIRES_LINE): New macro.
(leapseconds): Use it.
* NEWS, zic.8: Mention this.
* leapseconds.awk: Also output an "Expires" line, but
comment it out for now so that older zic implementations
do not reject the generated leapseconds file.
* zic.c (LC_EXPIRES, EXPIRES_FIELDS): New macros.
(leapexpires): New static var.
(leap_line_codes, infile, adjleap):
Add support for expiration lines.
(getleapdatetime): New function, with much of the former
inleap implementation.
(inleap): Use it.
(inexpires): New function.
Diffstat (limited to 'zic.8')
-rw-r--r-- | zic.8 | 41 |
1 files changed, 40 insertions, 1 deletions
@@ -606,7 +606,9 @@ 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. .PP -Lines in the file that describes leap seconds have the following form: +The file that describes leap seconds can have leap lines and an +expiration line. +Leap lines have the following form: .nf .ti +.5i .ta \w'Leap\0\0'u +\w'YEAR\0\0'u +\w'MONTH\0\0'u +\w'DAY\0\0'u +\w'HH:MM:SS\0\0'u +\w'CORR\0\0'u @@ -646,6 +648,43 @@ or .q "Rolling" if the leap second time given by the other fields should be interpreted as local (wall clock) time. +.PP +The expiration line, if present, has the form: +.nf +.ti +.5i +.ta \w'Expires\0\0'u +\w'YEAR\0\0'u +\w'MONTH\0\0'u +\w'DAY\0\0'u +.sp +Expires YEAR MONTH DAY HH:MM:SS +.sp +For example: +.ti +.5i +.sp +Expires 2020 Dec 28 00:00:00 +.sp +.fi +The +.BR YEAR , +.BR MONTH , +.BR DAY , +and +.B HH:MM:SS +fields give the expiration timestamp in UTC for the leap second table; +.B zic +outputs this expiration timestamp by truncating the end of the output +file to the timestamp. +If there is no expiration line, +.B zic +also accepts a comment +.q "#expires \fIE\fP ...\&" +where +.I E +is the expiration timestamp as a decimal integer count of seconds +since the Epoch, not counting leap seconds. +However, the +.q "#expires" +comment is an obsolescent feature, +and the leap second file should use an expiration line +instead of relying on a comment. .SH "EXTENDED EXAMPLE" Here is an extended example of .B zic |