summaryrefslogtreecommitdiff
path: root/zic.8
Commit message (Collapse)AuthorAgeFilesLines
...
* Use “timezone“ for timestamp historiesPaul Eggert2018-06-271-17/+21
| | | | | | | | | | | | | The POSIX standard uses the spelling “timezone”, and often uses it to mean a TZ setting that determines the past and predicted future of UT offsets, time zone abbreviations, and tm_isdst flags. In contrast, in popular usage by far the most common spelling is “time zone”, and it typically means a maximal geographic region of clocks that currently have the same standard time. As these two quite-different meanings are often confused, attempt to disambiguate things a bit by consistently using “timezone” for the former meaning and “time zone” for the latter. This affects documentation and a few diagnostic messages.
* Merge some changes from man-pages projectPaul Eggert2018-06-181-37/+51
| | | | | | | | | | | | | | Make some minor formatting changes to be more like man-pages. * tzfile.5: Break a line the same place that man-pages does. * zdump.8, zic.8: Use bold, not italics, for command and function names. Do not capitalize command names. Add a section header OPTIONS. Document --help. Fix some problems with fonts. Don’t quote "SEE ALSO", and don’t mention newctime(3). Put FILES before NOTES, and format a la man-pages. * zic.8: Also, do some fixes of our own, noticed while merging the above. Use real life US Rule, not an invented one. Write “UTOFF”, not “GMTOFF” (man-pages used “UTCOFF” but it’s not necessarily UTC either). Quote more carefully.
* Remove Big Bang hackPaul Eggert2018-06-131-6/+0
| | | | | | | | | | | | | | | | | | | | | | The Big Bang hack introduced in 2013d should no longer be needed, now that type 0 is the default type and types are reordered to make this happen. I.e., since we now have a better fix for the Macquarie Island problem reported by Alan Gutierrez in <https://mm.icann.org/pipermail/tz/2013-May/019368.html>, we can revert much of the 2013-05-23 12:19:13 -0700 change “Rework to avoid problem with Australia/Macquarie on 32-bit hosts” and the 2014-05-01 16:32:16 -0700 followup change “zic: improve handling of low-valued time stamps” which caused zic to insert a dummy transition. As a result, zic now generates TZif files that are typically a few bytes shorter, as they were in 2013c and earlier. * Makefile, zic.8: Remove mention of Big Bang. * NEWS: Mention. * zic.c (BIG_BANG, WORK_AROUND_CLIENT_OVERFLOW_BUGS, early_time): Remove. All uses removed. (writezone): New arg DEFAULTTYPE. All callers changed. Simplify by not inserting a dummy transition before the Big Bang. (outzone): Compute default type for use by writezone. (addtt): Don’t second-guess type 0.
* Prefer “timestamp” to “time stamp”Paul Eggert2018-05-271-3/+3
| | | | | | POSIX uses the single-word form, so use that. Change a “time keeping” to “timekeeping” while we’re at it. However, do not change quotations from others.
* Pick grammar nitPaul Eggert2018-05-141-1/+1
| | | | * zic.8: Don’t end sentence in preposition. (Noted by Paul Goyette.)
* Constrain Rule namesPaul Eggert2018-05-131-1/+9
| | | | | | | | | * NEWS: Mention this. * zic.8 (DESCRIPTION): Say that Rule names must start with a character that is neither "-" nor "+" nor a digit; this avoids ambiguity with integer offsets and disallows empty names. Say also that unquoted names should not contain !$%&'()*,/:;<=>?@[\]^`{|}~ to allow for future extensions. (Possibility of future extensions noted by Tom Lane.)
* Support s and d suffixes in Zone SAVE column tooPaul Eggert2018-04-081-1/+3
| | | | | | | | | | | | Lack of regularity noted by Michael Deckers in: https://mm.icann.org/pipermail/tz/2018-April/026408.html * NEWS, zic.8: Document this. * zic.c (struct zone.z_rule): No longer pointer-to-const. (struct zone.z_isdst): New member. (getstdoff): New function, mostly taken from part of inrule. (associate, inrule): Use it. (stringzone, outzone): Look at z_isdst, not at whether z_stdoff is nonzero.
* * Makefile, strftime.c, zic.8: alternate -> alternativePaul Eggert2018-04-081-4/+4
|
* Support SAVE suffixes, for Namibia 1994-2017Paul Eggert2018-04-071-6/+14
| | | | | | | | | | | | | | | | | | | | | | | From 1994 through 2017, Nambia officially alternated between two standard times, and did not observe daylight saving time. (Problem reported by Michael Deckers.) Add a new feature to zic, so that this behavior can be expressed compactly in Rule lines. For now, use the new feature only in vanguard format. In the main and rearguard formats, explicitly list two transitions for every year affected instead. * NEWS, zic.8: Document this. * africa (Namibia): Use this rule only in vanguard format, and use the new ‘s’ suffix so that winter and summer time are both standard. (Africa/Windhoek): In vanguard format, simply use the Namibia rule. Otherwise, explicitly list each transition from 1994 through 2017. * zic.c (struct rule): New member r_isdst. All uses of r_stdoff changed to use this member instead of assuming that nonzero r_stdoff iff daylight-saving. (inrule): Parse new SAVE suffixes. (doabbr): New isdst arg. All uses changed. (stringzone): Initialize r_isdst too. * ziguard.awk (Zone_using_Namibia_rule): Adjust to ‘africa’ changes.
* Remove subseconds from vanguard dataPaul Eggert2018-02-091-1/+1
| | | | | | | * NEWS: Do not mention subseconds in data. * theory.html: Improve description of problems with subseconds. * zic.8: Don’t imply zic will someday transmit subsecond info. * ziguard.awk: Remove translation of subseconds.
* zic now rounds to evenPaul Eggert2018-02-041-1/+3
| | | | | | * NEWS, zic.8: Mention this. * zic.c (gethms): Round to even instead of discarding fractional seconds.
* Add fractional seconds to data formatPaul Eggert2018-01-311-1/+6
| | | | | | * NEWS, zic.8: Mention this. * zic.c (gethms): Accept and ignore fractional seconds. Simplify by using just one call to sscanf instead of three.
* Change default installation to be more like DebianPaul Eggert2017-12-181-2/+8
| | | | | | | | | | | | | | | | | | | | | (This responds to suggestions from Brian Inglis and from Steve Summit.) * Makefile (DESTDIR, TZDEFAULT, USRDIR, USRSHAREDIR, BINDIR) (ZDUMPDIR, ZICDIR): New macro definitions. (TOPDIR): Now defaults to empty, which means the root directory. (TZDIR): Now defaults to /usr/share/zoneinfo instead of to /usr/local/etc/zoneinfo. (MANDIR): Now defaults to /usr/share/man instead of to /usr/local/man. (LIBDIR): Now defaults to /usr/lib instead of to /usr/local/lib. (install): Adjust to the above macro changes. Use zic -t. (LEAPSECONDS): Propagate TZDEFAULT to submakes. (check_time_t_alternatives): Adjust to installation changes. * NEWS: Document this. * date.1, newctime.3, newtzset.3, tzselect.8, zic.8: Document changes to default file locations. * tzfile.h (TZDIR, TZDEFAULT): Make the defaults agree with Makefile. * zic.c (usage): Mention -t. (tzdefault): New static var. (main, inzone): Support new -t option.
* Document zic "out-of-range" times and yearsPaul Eggert2017-12-111-24/+27
| | | | | | | | | | (Problem reported by Michael Deckers.) * NEWS: Mention this. * zic.8: Describe longstanding zic behavior for out-of-normal range years and hours. Reformat examples to use shorter lines so that they fit better into man pages. Use examples that are a bit closer to the real thing. Fix typo that put Zurich west of Greenwich.
* * europe, zic.8: Clarify EU vs EC.Paul Eggert2017-12-101-0/+2
|
* Be more consistent about UT vs UTCPaul Eggert2017-11-061-2/+2
| | | | | | | | | | * NEWS, africa, asia, australasia, europe, localtime.c: * newctime.3, newtzset.3, northamerica, southamerica, theory.html: * tz-link.htm, tzselect.ksh, zdump.c, zic.8, zic.c: Be more consistent about using "UT" instead of "UTC" when talking about timestamps that might predate the introduction of UTC. * tzselect.ksh: Use AEST instead of the (obsolescent) abbreviation GST when talking about UT offsets.
* Fix zic parsing of abbreviated line codesPaul Eggert2017-06-021-1/+8
| | | | | | | | | * NEWS: Document this. * zic.8: Document more clearly that "Zone" etc. can be abbreviated. * zic.c (line_codes): Remove, replacing with ... (zi_line_codes, leap_line_codes): ... these new constants. (infile): Use them to distinguish context more accurately. Remove no-longer-applicable warning.
* Document zic abbreviation rulesPaul Eggert2017-05-231-2/+9
| | | | * NEWS, zic.8: Describe how zic supports abbreviations like "Sun".
* Reject outlandish leap secondsPaul Eggert2017-05-101-14/+0
| | | | | | | | | | | | | | | | | | | | | | Remove support for double leap seconds, or more generally, leap seconds that are so close together that they cannot possibly be valid. Also, do not allow leap seconds before the Epoch, as they cannot happen and they complicate overflow checking. This fixes a GCC warning reported by Robert Elz in: http://mm.icann.org/pipermail/tz/2017-May/024995.html with followup help by Bradley White in: http://mm.icann.org/pipermail/tz/2017-May/024996.html * NEWS, tzfile.5: Mention this. * localtime.c (tzloadbody): Disallow leap seconds that occur before the epoch, or occur too close together. * localtime.c (timesub): Remove unused code that worried about double leap seconds, which cannot happen any more. Simplify. * zic.c (inleap): Do not worry about double leap seconds. Do not allow leap seconds before the Epoch. Remove no-longer-needed check about repeated leap seconds; superseded by new check in adjleap. (adjleap): Do not allow leap seconds that are too close together. * zic.8: Remove comment about the removed feature.
* Give free source for Quinn paperPaul Eggert2017-04-021-1/+4
| | | | | * leapseconds.awk, zic.8: Mention the NIST-distributed copy of the Quinn paper, too.
* Fix "-"s in zic man page with Bell Labs troffPaul Eggert2016-05-291-1/+1
| | | | * zic.8: Fix a typo in defining \*- when using traditional troff.
* Support %z in Zone formatsPaul Eggert2015-07-191-0/+13
| | | | | | | | | | | | | | | | | This extends the zic input format to add support for %z, which expands to a UTC offset in as-short-as-possible ISO 8601 format. It's intended to better support zones that do not have an established abbreviation already. This is a change only to zic; it does not affect the data, which can still be compiled with older zic versions. * NEWS, zic.8: Document this. * zic.c (struct zone): New member z_format_specifier. (PERCENT_Z_LEN_BOUND): New constant. (max_abbrvar_len): Initialize to it, rather than to 0. (associate, inzsub, doabbr): Add support for %z. (abbroffset): New function. (doabbr): 2nd arg is now struct zone *, not a char *. All callers changed.
* Two rules can't take effect at the same timePaul Eggert2015-07-191-0/+5
| | | | | | * NEWS: Document this. * zic.8: Document simultaneity constraints. * zic.c (outzone): Check for two rules taking effect at the same time.
* Zone TYPEs other than '-' are now obsolescentPaul Eggert2015-07-191-26/+3
| | | | | | * NEWS: Document this. * zic.8: Remove documentation of -y and of non-'-' TYPE values. * zic.c (usage): Don't document -y.
* Don't warn about abbreviations like '-05'Paul Eggert2015-07-151-0/+2
| | | | | | * NEWS, zic.8: Document this. * zic.c (newabbr): Allow abbreviations that (when quoted) conform to POSIX.1-2001 or later.
* Document zic's standard time + SAVE behaviorPaul Eggert2015-07-141-0/+8
| | | | | * zic.8: Say that only the sum matters when adding standard time to daylight-saving offsets.
* zic: clarify UNTIL columnPaul Eggert2015-06-061-1/+2
| | | | | | * zic.8: Say that the UNTIL column is interpreted using the rules in effect before the transition. See Howard Hinnant's question in: http://mm.icann.org/pipermail/tz/2015-June/022293.html
* * NEWS, Theory, zdump.8, zic.8: Document that the proleptic GregorianPaul Eggert2014-09-111-1/+1
| | | | calendar is used. (Thanks to Alan Barrett for the suggestion.)
* Rename fields of Link lines for clarity.Tim Parenti2014-08-161-4/+3
| | | | | | | | | * zic.8, zoneinfo2tdf.pl: Change names of Link line fields to be more descriptive and more like the parameters of 'ln'. LINK-FROM becomes TARGET, and LINK-TO becomes LINK-NAME. * backward: Add a '# Link' header. * europe, northamerica: Add a few '# Zone' headers where needed. * NEWS: Document this.
* The word "data" is plural.Paul Eggert2014-08-121-1/+1
|
* More consistent spacing in UNTIL fields.Tim Parenti2014-08-091-1/+1
| | | | * zic.8: Also fix this in the Zone line example.
* Minor spelling, accent, and spacing fixes.Paul Eggert2014-08-091-1/+1
| | | | | | In particular, this patch is makes the commentary more systematic about preferring "time zone" to "timezone" except when quoting someone else or when talking about code that uses "timezone".
* * zic.8, NEWS: Clarify use of time types in rule lines.Paul Eggert2014-07-081-0/+4
| | | | (Thanks to Arthur David Olson.)
* Commentary fixes related to AEST/AEDT etc.Tim Parenti2014-06-301-1/+1
| | | | | | | | * antarctica (Antarctica/Casey): Spell out AWST in comment. * tz-link.htm: Use CST instead of EST in the example, as in Theory, to match the current database. * zic.8: Update Australia/Adelaide Zone line example to match current usage.
* Fix glitches with '-' and italics in man pages.Paul Eggert2014-06-281-52/+38
| | | | | | | | | | | Using '\-' to denote ASCII minus has problems in groff output, since it generates a minus sign in the current font, and if you cut and paste from the documentation the resulting text won't work. To avoid the problem, define a string \*- that expands to ASCII minus in a constant-width font in groff. Also, change some instances of \(mi and \(pl to use plain \- and +, since we no longer need special fonts for these. Finally, remove some no-longer-needed instances of "\^" after italicized words.
* * zic.8: Fix formatting of long URL.Paul Eggert2014-06-271-1/+7
| | | | | * zic.8: Format the URL better, by using groff's .URL macro, falling back on a portable alternative for non-groff implementations.
* 'zic' now rejects output file names with '.' or '..' components.Paul Eggert2014-06-261-3/+12
| | | | | | | * zic.8, NEWS: Say that "." and ".." file name components are not allowed in output file names. * zic.c (componentcheck, namecheck): Do not allow such file name components.
* * zic.8, NEWS: Document character encoding issues better.Paul Eggert2014-06-261-1/+17
| | | | (Thanks to Guy Harris for reporting the problem.)
* 'zic -v' now warns about all '.'s in output file names.Paul Eggert2014-06-261-6/+1
| | | | | | * zic.c (componentcheck, namecheck): Warn about all '.'s in the file name, not merely about "." and ".." file name components. * zic.8 (DESCRIPTION), NEWS: Document this.
* Check POSIX file name restrictions more carefully.Paul Eggert2014-06-251-0/+14
| | | | | | | | | | | | | Also, document the longstanding exceptions to POSIX. Derived from Arthur David Olson's patch in: http://mm.icann.org/pipermail/tz/2014-June/021052.html * Theory: Document the exceptional file name components in 'etcetera' and 'backward' that contain '+' or digits, or are too long. * zic.8 (DESCRIPTION): Document the change to zic. * zic.c (component_length_check, namecheck): New functions. (dolink, writezone): Use them to check that file name components obey the POSIX rules, and do not contain "." or "..". * NEWS: Document the above.
* Don't abuse "`" to mean open quote.Paul Eggert2014-06-151-17/+17
| | | | | | | | | | | | | | | | This was appropriate before Unicode, where "`" and "'" often balanced in visual output, but that's been obsolete for a while. Overall, single-quote 'like this' instead of `like this', and double-quote "like this" or (in typeset output) “like this” instead of ``like this''. While we're at it, fix some glitches with hyphens versus minus versus en dash versus em dash. * Makefile ($(MANTXTS)): Use UTF-8 locale to produce *.txt output. * checktab.awk, tzselect.ksh: Quote 'like this' in diagnostics, instead of `like this'. * date.1, newctime.3, newtzset.3, time2posix.3, zic.8 (q, lq, rq): New macros. Use them for better double-quoting in output. * workman.sh: Tell Perl that its stdin and stdout are UTF-8. * NEWS: Document this.
* zic: move Big Bang to - 2**59Paul Eggert2014-05-261-2/+2
| | | | | | | This should help forestall flame wars among competing camps of physicists. (Thanks to James Cloos.) * NEWS, zic.8 (NOTES): Document this. * zic.c (BIG_BANG): Use - 2**59 rather than a more-precise estimate.
* zic: work around GNOME bug by refusing to go back before the Big BangPaul Eggert2014-05-231-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | This works around Gnome bug 730332 <https://bugzilla.gnome.org/show_bug.cgi?id=730332>. zic 2014c introduced the idea of generating a transition at the minimum time value -2**63, to avoid ambiguities about what to do before the first real transition. Through Glib release 2.40, the interval_end function of Glib's gtimezone.c subtracts one from this, to find the end time of the zeroth interval (i.e., the interval containing all the "early" time stamps); this subtraction typically overflows and wraps around to 2**63 - 1, which causes Glib to go off the rails and assume that all time stamps are "early". For example, Glib computes Sao Paulo time stamps as if Brazil's circa-1913 rules were still in effect. (Thanks to Leonardo Chiquitto for reporting the bug.) Work around the bug by not generating time stamps equal to -2**63. Come to think of it, time stamps before the Big Bang are physically suspect anyway, so don't generate time stamps before the Big Bang. * Makefile (GCC_DEBUG_FLAGS): Add comment re BIG_BANG. * NEWS, zic.8 (NOTES): Document this. * zic.c (BIG_BANG): New macro. (big_bang_time): New constant. (writezone, outzone, addtt): Compare to big_bang_time, not to min_time, when deciding whether to output a time stamp.
* * zic.8: "any number of" -> "one or more" white space chars.Paul Eggert2013-09-151-1/+1
| | | | | Problem reported by Michael Deckers in <http://mm.icann.org/pipermail/tz/2013-September/020206.html>.
* * europe, zic.8 (Europe/Zurich): Change transition to 1853-07-16.Paul Eggert2013-09-111-3/+3
| | | | | | Explain how I derived this guess from Messerli's book. Also, give better evidence about the 1894 transition, from Pierre-Yves Berger.
* * europe, zic.8: Correct Bern Mean Time to 0:29:46.Paul Eggert2013-09-111-7/+10
| | | | | Reported by Alois Treindl in <http://mm.icann.org/pipermail/tz/2013-September/020139.html>.
* Revert the change that added meta-information to version-3 format.Paul Eggert2013-09-111-14/+0
| | | | | | | | | | | | Further testing found that it was incompatible with Ubuntu 12.04 glibc so this feature requires redesign and more testing. * Makefile (ZFLAGS): Remove comment about name and version info. Make it an empty var instead. * tzfile.5, tzfile.h: Remove description of meta-information. * zic.8: Remove options -n and -o. * zic.c: Don't include <stddef.h>. (genoption, genoptions, genname, addgenoption, writevalue): Remove. (usage, main, writezone): Remove support for -n and -o.
* * zic.8 (EXTENDED EXAMPLE): Adjust to match what's in 'europe' now.Paul Eggert2013-09-111-10/+6
| | | | | Reported by Alois Treindl in <http://mm.icann.org/pipermail/tz/2011-August/008722.html>.
* Add optional meta-information to version-3 format.Paul Eggert2013-09-091-0/+14
| | | | | | | | | | | | * Makefile (ZFLAGS): Add a comment about how to enable meta-info. * tzfile.5: Describe meta-information. * zic.8: Document new options -n and -o, which cause zic to generate meta-info. * zic.c: Include <stddef.h>, for ptrdiff_t. (genoption, genoptions, genname): New static vars. (usage): Summarize new options. (addgenoption, writevalue): New function. (main, writezone): Add support for new options.
* Bump tzfile format to version 3.Paul Eggert2013-09-081-5/+33
| | | | | | | | | | | Also, improve the documentation and diagnostics in this area. Suggested by Arthur David Olson in <http://mm.icann.org/pipermail/tz/2013-September/020064.html>. * tzfile.5, tzfile.h: Bump tzfile format to version 3. * zic.8: Document -v better. * zic.c (ZIC_VERSION): Bump from '2' to '3'. (stringrule, stringzone, outzone): Report compatibility issues more carefully, mentioning client dates.