Module Name:    src
Committed By:   martin
Date:           Sun Dec 31 12:34:49 UTC 2023

Modified Files:
        src/lib/libc/time [netbsd-10]: zdump.8 zic.8

Log Message:
Pull up the following, requested by kre in ticket #528:

        lib/libc/time/zic.8                             up to 1.49
        lib/libc/time/zdump.8                           up to 1.25

PR/57757: Izumi Tsutsui: Fix markup errors


To generate a diff of this commit:
cvs rdiff -u -r1.22 -r1.22.2.1 src/lib/libc/time/zdump.8
cvs rdiff -u -r1.41 -r1.41.2.1 src/lib/libc/time/zic.8

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/lib/libc/time/zdump.8
diff -u src/lib/libc/time/zdump.8:1.22 src/lib/libc/time/zdump.8:1.22.2.1
--- src/lib/libc/time/zdump.8:1.22	Sun Dec 11 17:57:23 2022
+++ src/lib/libc/time/zdump.8	Sun Dec 31 12:34:48 2023
@@ -1,9 +1,9 @@
-.\" $NetBSD: zdump.8,v 1.22 2022/12/11 17:57:23 christos Exp $
+.\" $NetBSD: zdump.8,v 1.22.2.1 2023/12/31 12:34:48 martin Exp $
 .\" @(#)zdump.8	8.2
 .\" This file is in the public domain, so clarified as of
 .\" 2009-05-17 by Arthur David Olson.
-.TH zdump 8
-.Dd October 22, 2021
+.\" .TH zdump 8
+.Dd December 6, 2023
 .Dt ZDUMP 8
 .Os
 .Sh NAME
@@ -26,7 +26,7 @@ The
 program prints the current time in each
 .Ar timezone
 named on the command line.
-.SH OPTIONS
+.Sh OPTIONS
 .Bl -tag -width XXXXXXXXX -compact
 .It Fl \-version
 Output version information and exit.
@@ -48,9 +48,9 @@ For each
 on the command line,
 print the times at the two extreme time values,
 the times (if present) at and just beyond the boundaries of years that
-.BR localtime (3)
+.Xr localtime 3
 and
-.BR gmtime (3)
+.Xr gmtime 3
 can represent, and
 the times both one second before and exactly at
 each detected time discontinuity.

Index: src/lib/libc/time/zic.8
diff -u src/lib/libc/time/zic.8:1.41 src/lib/libc/time/zic.8:1.41.2.1
--- src/lib/libc/time/zic.8:1.41	Sun Dec 11 17:57:23 2022
+++ src/lib/libc/time/zic.8	Sun Dec 31 12:34:48 2023
@@ -1,9 +1,9 @@
-.\" $NetBSD: zic.8,v 1.41 2022/12/11 17:57:23 christos Exp $
+.\" $NetBSD: zic.8,v 1.41.2.1 2023/12/31 12:34:48 martin Exp $
 .\" @(#)zic.8	8.6
 .\" This file is in the public domain, so clarified as of
 .\" 2009-05-17 by Arthur David Olson.
-.TH zic 8
-.Dd August 24, 2022
+.\" .TH zic 8
+.Dd December 6, 2023
 .Dt ZIC 8
 .Os
 .Sh NAME
@@ -11,8 +11,8 @@
 .Nd timezone compiler
 .Sh SYNOPSIS
 .Nm
-.Op Fl \-version
-.Op Fl \-help
+.Op Fl Fl version
+.Op Fl Fl help
 .Op Fl b
 .Op Fl d Ar directory
 .Op Fl L Ar leapsecondfilename
@@ -22,7 +22,7 @@
 .Op Fl t Ar file
 .Op Fl v
 .Op Fl y Ar command
-.Op Ar Filename ...
+.Op Ar
 .Sh DESCRIPTION
 The
 .Nm
@@ -30,16 +30,15 @@ program reads text from the file(s) name
 and creates the timezone information format (TZif) files
 specified in this input.
 If a
-.Ar filename
+.Ar file
 is
-.Ar \&- ,
+.Ql \&\- ,
 standard input is read.
-.Pp
-.Sh OPTIONS
-.Bl -tag -width XXXXXXXXXX -compact
-.It Fl \-version
+.Ss Options
+.Bl -tag -width Fl
+.It Fl Fl version
 Output version information and exit.
-.It Fl \-help
+.It Fl Fl help
 Output short usage message and exit.
 .It Fl b Ar bloat
 Output backward-compatibility data as specified by
@@ -47,37 +46,40 @@ Output backward-compatibility data as sp
 If
 .Ar bloat
 is
-.Dv fat ,
+.Ql fat ,
 generate additional data entries that work around potential bugs or
 incompatibilities in older software, such as software that mishandles
 the 64-bit generated data.
 If
 .Ar bloat
 is
-.Dv slim ,
+.Ql slim ,
 keep the output files small; this can help check for the bugs
 and incompatibilities.
 The default is
-.Dv slim ,
+.Ql slim ,
 as software that mishandles 64-bit data typically
 mishandles timestamps after the year 2038 anyway.
 Also see the
 .Fl r
 option for another way to alter output size.
 .It Fl d Ar directory
-Create time conversion information files in the named directory rather than
-in the standard directory named below.
+Create time conversion information files in the named
+.Ar directory
+rather than in the standard directory named below.
 .It Fl l Ar timezone
-Use the 
+Use the
 .Ar timezone
 as local time.
 .Nm
 will act as if the input contained a link line of the form
-.Dl Link	timezone	localtime
+.Pp
+.D1 Li Link Ar timezone Li localtime
+.Pp
 If
 .Ar timezone
 is
-.Dv \&- ,
+.Ql \&\- ,
 any already-existing link is removed.
 .It Fl L Ar leapsecondfilename
 Read leap second information from the file with the given name.
@@ -85,28 +87,32 @@ If this option is not used,
 no leap second information appears in output files.
 .It Fl p Ar timezone
 Use
-.Ar timezone's
-rules when handling POSIX-format
-TZ strings like 
-.Qq EET\&-2EEST
+.Ar timezone Ap s
+rules when handling POSIX-format TZ strings like
+.Ql EET\-2EEST
 that lack transition rules.
 .Nm
 will act as if the input contained a link line of the form
-.Dl Link	timezone	posixrules
 .Pp
-This feature is obsolete and poorly supported.
+.D1 Li Link Ar timezone Li posixrules
+.Pp
+Unless
+.Ar timezone
+is
+.Ql \&\- ,
+this option is obsolete and poorly supported.
 Among other things it should not be used for timestamps after the year 2037,
 and it should not be combined with
-.Fl b Ar slim
+.Fl b Cm slim
 if
-.Va timezone's
+.Ar timezone Ap s
 transitions are at standard time or Universal Time (UT) instead of local time.
 If
 .Ar timezone
 is
-.Dv \&- ,
+.Ql \&\- ,
 any already-existing link is removed.
-.It Fl r Op Ar @lo / Op Ar @hi
+.It Fl r Op Cm @ Ns Ar lo Ns Op Cm /@ Ns Ar hi
 Limit the applicability of output files
 to timestamps in the range from
 .Ar lo
@@ -116,43 +122,43 @@ to timestamps in the range from
 .Ar lo
 and
 .Ar hi
-are possibly-signed decimal counts of seconds since the Epoch
+are possibly signed decimal counts of seconds since the Epoch
 (1970-01-01 00:00:00 UTC).
 Omitted counts default to extreme values.
 The output files use UT offset 0 and abbreviation
-.q "\*-00"
+.Ql \&\-00
 in place of the omitted timestamp data.
 For example,
-.Bd -literal
-zic -r @0
-.Ed
+.Pp
+.Dl zic -r @0
+.Pp
 omits data intended for negative timestamps (i.e., before the Epoch), and
-.Bd -literal
-zic -r @0/@2147483648
-.Ed
+.Pp
+.Dl zic -r @0/@2147483648
+.Pp
 outputs data intended only for nonnegative timestamps that fit into
 31-bit signed integers.
-Or using 
+Or using
 .Xr date 1 ,
-.Bd -literal
-zic -r @$(date +%s)
-.Ed
+.Pp
+.Dl zic -r @$(date +%s)
+.Pp
 omits data intended for past timestamps.
 Although this option typically reduces the output file's size,
 the size can increase due to the need to represent the timestamp range
 boundaries, particularly if
 .Ar hi
 causes a TZif file to contain explicit entries for
-.Ar pre- hi
+.No pre- Ns Ar hi
 transitions rather than concisely representing them
 with an extended POSIX TZ string.
 Also see the
-.Fl b Ar slim
+.Fl b Cm slim
 option for another way to shrink output size.
-.It Fl R Ar @hi
+.It Fl R Cm @ Ns Ar hi
 Generate redundant trailing explicit transitions for timestamps
 that occur less than
-Ar hi
+.Ar hi
 seconds since the Epoch, even though the transitions could be
 more concisely represented via the extended POSIX TZ string.
 This option does not affect the represented timestamps.
@@ -166,7 +172,7 @@ the named file rather than in the standa
 Be more verbose, and complain about the following situations:
 .Bl -dash
 .It
-+The input specifies a link to a link,
+The input specifies a link to a link,
 something not supported by some older parsers, including
 .Nm
 itself through release 2022e.
@@ -185,7 +191,7 @@ Pre-2004 versions of
 prohibit this.
 .It
 A time zone abbreviation uses a
-.Dv %z
+.Ql %z
 format.
 Pre-2015 versions of
 .Nm
@@ -200,31 +206,31 @@ The input contains abbreviations that ar
 .Nm
 due to a longstanding coding bug.
 These abbreviations include
-.Qq L
+.Ql L
 for
-.Qq Link ,
-.Qq mi
+.Ql Link ,
+.Ql mi
 for
-.Qq min ,
-.Qq Sa
+.Ql min ,
+.Ql Sa
 for
-.Qq Sat ,
+.Ql Sat ,
 and
-.Qq Su
+.Ql Su
 for
-.Qq Sun .
+.Ql Sun .
 .It
 The output file does not contain all the information about the
 long-term future of a timezone, because the future cannot be summarized as
 an extended POSIX TZ string.
-For example, as of 2019 this problem
-occurs for Iran's daylight-saving rules for the predicted future, as
-these rules are based on the Iranian calendar, which cannot be
-represented.
+For example, as of 2023 this problem
+occurs for Morocco's daylight-saving rules, as
+on predictions for when Ramadan will be observed, something that
+an extended POSIX TZ string cannot represent.
 .It
 The output contains data that may not be handled properly by client
 code designed for older
-.Xr zic 8
+.Nm
 output formats.
 These compatibility issues affect only timestamps
 before 1970 or after the start of 2038.
@@ -233,8 +239,9 @@ The output contains a truncated leap sec
 which can cause some older TZif readers to misbehave.
 This can occur if the
 .Fl L
-option is used, and either an Expires line is present or
-the
+option is used, and either an
+.Ql Expires
+line is present or the
 .Fl r
 option is also used.
 .It
@@ -249,35 +256,40 @@ POSIX requires at least 3, and requires 
 at least 6.
 .It
 An output file name contains a byte that is not an ASCII letter,
-.Qq - ,
-.Qq / ,
+.Ql \&\- ,
+.Ql / ,
 or
-.Qq _ ;
-or it 
+.Ql _ ;
 or it contains a file name component that contains more than 14 bytes
 or that starts with
-.Qq - .
+.Ql \&\- .
 .El
 .El
-.Pp
+.\"
+.Ss Zone description file format
 Input files should be text files, that is, they should be a series of
 zero or more lines, each ending in a newline byte and containing at
 most 2048 bytes counting the newline, and without any
-.Dv NUL
+.Tn NUL
 bytes.
 The input text's encoding
-is typically UTF-8 or ASCII; it should have a unibyte representation
-for the POSIX Portable Character Set (PPCS)
-.Rs
-.%U https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap06.html
-.Re
+is typically
+.Tn UTF-8
+or
+.Tn ASCII ;
+it should have a unibyte representation
+for the POSIX Portable Character Set
+.Tn ( PPCS )
+.Pq Lk https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap06.html
 and the encoding's non-unibyte characters should consist entirely of
-non-PPCS bytes.
-Non-PPCS characters typically occur only in comments:
+.No non- Ns Tn PPCS
+bytes.
+.No Non- Ns Tn PPCS
+characters typically occur only in comments:
 although output file names and time zone abbreviations can contain
 nearly any character, other software will work better if these are
 limited to the restricted syntax described under the
-.Op v
+.Fl v
 option.
 .Pp
 Input lines are made up of fields.
@@ -285,12 +297,13 @@ Fields are separated from one another by
 The white space characters are space, form feed, carriage return, newline,
 tab, and vertical tab.
 Leading and trailing white space on input lines is ignored.
-An unquoted sharp character (#) in the input introduces a comment which extends
+An unquoted sharp character
+.Pq Ql #
+in the input introduces a comment which extends
 to the end of the line the sharp character appears on.
 White space characters and sharp characters may be enclosed in double
 quotes
-.Pq \&"
-.\" XXX "
+.Pq Ql \*q
 if they're to be used as part of a field.
 Any line that is blank (after comment stripping) is ignored.
 Nonblank lines are expected to be of one of three types:
@@ -299,183 +312,203 @@ rule lines, zone lines, and link lines.
 Names must be in English and are case insensitive.
 They appear in several contexts, and include month and weekday names
 and keywords such as
-.Qq maximum ,
-.Qq only ,
-.Qq Rolling ,
+.Ql maximum ,
+.Ql only ,
+.Ql Rolling ,
 and
-.Qq Zone .
+.Ql Zone .
 A name can be abbreviated by omitting all but an initial prefix; any
 abbreviation must be unambiguous in context.
+.\"
+.\" Rule Line
+.\"
+.Pp
+A
+.Sy rule line
+has the form
 .Pp
-A rule line has the form
-.Pp
-.Dl Rule	NAME	FROM	TO	\&-	IN	ON		AT		SAVE		LETTER/S
+.Bl -column -compact -offset indent "Rule" "NAME" "FROM" "1995" "\&*" "Apr" "lastSun" "2:00w" "1:00d" "LETTER/S"
+.It Rule	NAME	FROM	TO	\&\-	IN	ON	AT	SAVE	LETTER/S
+.El
 .Pp
 For example:
 .Pp
-.Dl Rule	US	1967	1973	\&-	Apr	lastSun	2:00w	1:00d	D
+.Bl -column -compact -offset indent "Rule" "NAME" "FROM" "1995" "\&*" "Apr" "lastSun" "2:00w" "1:00d" "LETTER/S"
+.It Rule	US	1967	1973	\&\-	Apr	lastSun	2:00w	1:00d	D
+.El
 .Pp
 The fields that make up a rule line are:
-.Bl -tag -width "LETTER/S"
-.It NAME
+.Bl -tag -width Ar
+.\"
+.It Ar NAME
 Gives the name of the rule set that contains this line.
-The name must start with a character that is neither
-an ASCII digit nor
-.Ar \&-
+The name must start with a character that is neither an
+.Tn ASCII
+digit nor
+.Ql \&\-
 nor
-.Ar + .
+.Ql + .
 To allow for future extensions,
 an unquoted name should not contain characters from the set
-.Ar !$%&'()*,/:;<=>?@[\e]^`{|}~ .
-.It FROM
+.Ql !$%&'()*,/:;<=>?@[\e]^`{|}~ .
+.\"
+.It Ar FROM
 Gives the first year in which the rule applies.
 Any signed integer year can be supplied; the proleptic Gregorian calendar
 is assumed, with year 0 preceding year 1.
 The word
-.Em minimum
+.Ql minimum
 (or an abbreviation) means the indefinite past.
 The word
-.Em maximum
+.Ql maximum
 (or an abbreviation) means the indefinite future.
 Rules can describe times that are not representable as time values,
 with the unrepresentable times ignored; this allows rules to be portable
 among hosts with differing time value types.
-.It TO
+.\"
+.It Ar TO
 Gives the final year in which the rule applies.
 In addition to
-.Em minimum
+.Ql minimum
 and
-.Em maximum
+.Ql maximum
 (as above),
 the word
-.Em only
+.Ql only
 (or an abbreviation)
 may be used to repeat the value of the
-.Em FROM
+.Ar FROM
 field.
-.It \&-
-should be
-.Qq \&-
+.\"
+.It Cm \&\-
+should always be
+.Ql \&\-
 for compatibility with older versions of
 .Nm .
 It was previously known as the
-.Em TYPE
+.Ar TYPE
 field, which could contain values to allow a
 separate script to further restrict in which
-.Em types
+.Qq types
 of years the rule would apply.
-.It IN
+.\"
+.It Ar IN
 Names the month in which the rule takes effect.
 Month names may be abbreviated.
-.It ON
+.\"
+.It Ar ON
 Gives the day on which the rule takes effect.
 Recognized forms include:
 .Pp
-.Bl -tag -width lastSun -compact -offset indent
-.It 5
+.Bl -tag -width Li -offset indent -compact
+.It Li 5
 the fifth of the month
-.It lastSun
+.It Li lastSun
 the last Sunday in the month
-.It lastMon
+.It Li lastMon
 the last Monday in the month
-.It Sun\*[Ge]8
+.It Li Sun>=8
 first Sunday on or after the eighth
-.It Sun\*[Le]25
+.It Li Sun<=25
 last Sunday on or before the 25th
 .El
 .Pp
 Names of days of the week may be abbreviated or spelled out in full.
 A weekday name (e.g.,
-.Qq Sunday )
+.Ql Sunday )
 or a weekday name preceded by
-.Qq last
+.Ql last
 (e.g.,
-.Qq lastSunday )
+.Ql lastSunday )
 may be abbreviated or spelled out in full.
 There must be no white space characters within the
-.Em ON
+.Ar ON
 field.
 The
-.Qq <=
+.Ql <=
 and
-.Qq >=
+.Ql >=
 constructs can result in a day in the neighboring month;
-for example, the IN-ON combination
-.Qq "Oct Sun>=31"
-tands for the first Sunday on or after October 31,
+for example, the IN\(enON combination
+.Ql "Oct Sun>=31"
+stands for the first Sunday on or after October 31,
 even if that Sunday occurs in November.
-.It AT
+.\"
+.It Ar AT
 Gives the time of day at which the rule takes effect,
 relative to 00:00, the start of a calendar day.
 Recognized forms include:
 .Pp
-.Bl -tag -width "00X19X32X13" -compact -offset indent
-.It 2
+.Bl -tag -width Li -compact -offset indent
+.It Li 2
 time in hours
-.It 2:00
+.It Li 2:00
 time in hours and minutes
-.It 01:28:14
+.It Li 01:28:14
 time in hours, minutes, and seconds
-.It 00:19:32.13
+.It Li 00:19:32.13
 time with fractional seconds
-.It 12:00
+.It Li 12:00
 midday, 12 hours after 00:00
-.It 15:00
-3 PM, 15 hours after 00:00
-.It 24:00
+.It Li 15:00
+3
+.Tn PM ,
+15 hours after 00:00
+.It Li 24:00
 end of day, 24 hours after 00:00
-.It 260:00
+.It Li 260:00
 260 hours after 00:00
-.It \-2:30
+.It Li \-2:30
 2.5 hours before 00:00
-.It \-
+.It Li \-
 equivalent to 0
 .El
 .Pp
 Although
-.I zic
+.Nm
 rounds times to the nearest integer second
 (breaking ties to the even integer), the fractions may be useful
 to other applications requiring greater precision.
 The source format does not specify any maximum precision.
 Any of these forms may be followed by the letter
-.Em w
+.Ql w
 if the given time is local or
-.Qq wall clock
+.Dq wall clock
 time,
-.Em s
+.Ql s
 if the given time is standard time without any adjustment for daylight saving,
 or
-.Em u
+.Ql u
 (or
-.Em g
+.Ql g
 or
-.Em z )
+.Ql z )
 if the given time is universal time;
 in the absence of an indicator,
 local (wall clock) time is assumed.
 These forms ignore leap seconds; for example,
 if a leap second occurs at 00:59:60 local time,
-.q "1:00"
+.Ql "1:00"
 stands for 3601 seconds after local midnight instead of the usual 3600 seconds.
 The intent is that a rule line describes the instants when a
 clock/calendar set to the type of time specified in the
-.Em AT
+.Ar AT
 field would show the specified date and time of day.
-.It SAVE
+.\"
+.It Ar SAVE
 Gives the amount of time to be added to local standard time when the rule is in
 effect, and whether the resulting time is standard or daylight saving.
 This field has the same format as the
-.Em AT
-field
-.Em s
+.Ar AT
+field, except with a different set of suffix letters:
+.Ql s
 for standard time and
-.Em d
+.Ql d
 for daylight saving time.
 The suffix letter is typically omitted, and defaults to
-.Em s
+.Ql s
 if the offset is zero and to
-.Em d
+.Ql d
 otherwise.
 Negative offsets are allowed; in Ireland, for example, daylight saving
 time is observed in winter and has a negative offset relative to
@@ -483,119 +516,147 @@ Irish Standard Time.
 The offset is merely added to standard time; for example,
 .Nm
 does not distinguish a 10:30 standard time plus an 0:30
-.Em SAVE
+.Ar SAVE
 from a 10:00 standard time plus a 1:00
-.Em SAVE .
-.It LETTER/S
+.Ar SAVE .
+.\"
+.It Ar LETTER/S
 Gives the
-.Qq variable part
+.Dq variable part
 (for example, the
-.Qq S
+.Ql S
 or
-.Qq D
+.Ql D
 in
-.Qq EST
+.Ql EST
 or
-.Qq EDT )
+.Ql EDT )
 of time zone abbreviations to be used when this rule is in effect.
 If this field is
-.Em \&- ,
+.Ql \&\- ,
 the variable part is null.
 .El
+.\"
+.\" Zone Line
+.\"
+.Pp
+A
+.Sy zone line
+has the form:
 .Pp
-A zone line has the form
-.Pp
-.Dl Zone	NAME			STDOFF	RULES/SAVE	FORMAT	[UNTIL]
+.Bl -column -compact -offset indent "Zone" "Asia/Amman" "STDOFF" "RULES/SAVE" "FORMAT" "[UNTIL]"
+Zone	NAME	STDOFF	RULES/SAVE	FORMAT	[UNTIL]
+.El
 .Pp
 For example:
 .Pp
-.Dl Zone	Asia/Amman	2:00	Jordan	EE%sT	2017 Oct 27 1:00
+.Bl -column -compact -offset indent "Zone" "Asia/Amman" "STDOFF" "RULES/SAVE" "FORMAT" "[UNTIL"]
+Zone	Asia/Amman	2:00	Jordan	EE%sT	2017 Oct 27 1:00
+.El
 .Pp
 The fields that make up a zone line are:
-.Bl -tag -width "RULES/SAVE"
-.It NAME
+.Bl -tag -width Ar
+.It Ar NAME
 The name of the timezone.
 This is the name used in creating the time conversion information file for the
 timezone.
 It should not contain a file name component
-.Qq .
+.Ql \&.
 or
-.Qq .. ;
+.Ql \&.. ;
 a file name component is a maximal substring that does not contain
-.Qq / .
-.It STDOFF
+.Ql / .
+.\"
+.It Ar STDOFF
 The amount of time to add to UT to get standard time,
 without any adjustment for daylight saving.
 This field has the same format as the
-.Em AT
+.Ar AT
 and
-.Em SAVE
+.Ar SAVE
 fields of rule lines, except without suffix letters;
 begin the field with a minus sign if time must be subtracted from UT.
-.It RULES
+.\"
+.It Ar RULES
 The name of the rules that apply in the timezone or,
-alternatively, a field in the same format as a rule-line SAVE column,
-giving the amount of time to be added to local standard time
+alternatively, a field in the same format as a rule-line
+.Ar SAVE
+column, giving the amount of time to be added to local standard time
 and whether the resulting time is standard or daylight saving.
 If this field is
-.Em \&-
+.Ql \&\-
 then standard time always applies.
 When an amount of time is given, only the sum of standard time and
 this amount matters.
-.It FORMAT
+.It Ar FORMAT
 The format for time zone abbreviations.
 The pair of characters
-.Em %s
+.Ql %s
 is used to show where the
-.Qq variable part
+.Dq variable part
 of the time zone abbreviation goes.
 Alternatively, a format can use the pair of characters
-.Em %z
-+to stand for the UT offset in the form
-.Em \(+- hh ,
-.Em \(+- hhmm ,
+.Ql %z
+to stand for the UT offset in the form
+.Pf \(+- Em \^hh ,
+.Pf \(+- Em \^hhmm ,
 or
-.Em \(+- hhmmss ,
+.Pf \(+- Em \^hhmmss ,
 using the shortest form that does not lose information, where
 .Em hh ,
 .Em mm ,
 and
 .Em ss
-are the hours, minutes, and seconds east (+) or west (\-) of UT.
+are the hours, minutes, and seconds east
+.Pq \&+
+or west
+.Pq \&\-
+of UT.
 Alternatively,
 a slash
-.Pq \&/
+.Pq Ql \&/
 separates standard and daylight abbreviations.
 To conform to POSIX, a time zone abbreviation should contain only
-alphanumeric ASCII characters,
-.Qq +
+alphanumeric
+.Tn ASCII
+characters,
+.Ql +
 and
-.Qq \&- .
+.Ql \&\- .
 By convention, the time zone abbreviation
-.Qq \&-00
+.Ql \&\-00
 is a placeholder that means local time is unspecified.
-.It UNTIL
+.\"
+.It Ar UNTIL
 The time at which the UT offset or the rule(s) change for a location.
-It takes the form of one to four fields YEAR [MONTH [DAY [TIME]]].
+It takes the form of one to four fields
+.Ar YEAR Oo
+.Ar MONTH Oo
+.Ar DAY Oo
+.Ar TIME
+.Oc Oc Oc .
 If this is specified,
 the time zone information is generated from the given UT offset
 and rule change until the time specified, which is interpreted using
 the rules in effect just before the transition.
-The month, day, and time of day have the same format as the IN, ON, and AT
+The month, day, and time of day have the same format as the
+.Ar IN ,
+.Ar ON ,
+and
+.Ar AT
 fields of a rule; trailing fields can be omitted, and default to the
 earliest possible value for the missing fields.
 .Pp
 The next line must be a
-.Qq continuation
-line; this has the same form as a zone line except that the
-string
-.Qq Zone
+.Sy continuation line ;
+this has the same form as a zone line except that the string
+.Ql Zone
 and the name are omitted, as the continuation line will
 place information starting at the time specified as the
-.Em until
+.Ar UNTIL
 information in the previous line in the file used by the previous line.
 Continuation lines may contain
-.Em until
+.Ar UNTIL
 information, just as zone lines do, indicating that the next line is a further
 continuation.
 .El
@@ -603,80 +664,90 @@ continuation.
 If a zone changes at the same instant that a rule would otherwise take
 effect in the earlier zone or continuation line, the rule is ignored.
 A zone or continuation line
-.I L
+.Em L
 with a named rule set starts with standard time by default:
 that is, any of
-.IR L 's
+.Em L Ap s
 timestamps preceding
-.IR L 's
+.Em L Ap s
 earliest rule use the rule in effect after
-.IR L 's
+.Em L Ap s
 first transition into standard time.
 In a single zone it is an error if two rules take effect at the same
 instant, or if two zone changes take effect at the same instant.
 .Pp
 If a continuation line subtracts
-.Dv N
+.Ar N
 seconds from the UT offset after a transition that would be
 interpreted to be later if using the continuation line's UT offset and
 rules, the
-.Em until
+.Ar UNTIL
 time of the previous zone or continuation line is interpreted
 according to the continuation line's UT offset and rules, and any rule
 that would otherwise take effect in the next
-.Dv N
+.Ar N
 seconds is instead assumed to take effect simultaneously.
 For example:
 .Pp
-.Bl -column -compact -offset indent "# Rule" "Swiss" "FROM" "1995" "\&*" "Oct" "lastSun" "1:00u" "SAVE" "LETTER/S"
-.It # Rule	NAME	FROM	TO	\&-	IN	ON	AT	SAVE	LETTER/S
-.It Rule	US	1967	2006	\&-	Oct	lastSun	2:00	0	S
-.It Rule	US	1967	1973	\&-	Apr	lastSun	2:00	1:00	D
-.It # Zone	NAME				STDOFF	RULES	FORMAT	[UNTIL]
-.It Zone	America/Menominee	\&-5:00	\&-	EST	1973 Apr 29 2:00
-.It						\&-6:00	US	C%sT
+.Bl -column -compact -offset indent "# Rule" "NAME" "FROM" "2006" "\&\-" "Oct" "lastSun" "1:00" "SAVE" "LETTER/S"
+.It # Rule	NAME	FROM	TO	\&\-	IN	ON	AT	SAVE	LETTER/S
+.It Rule	US	1967	2006	\&\-	Oct	lastSun	2:00	0	S
+.It Rule	US	1967	1973	\&\-	Apr	lastSun	2:00	1:00	D
+.El
+.Bl -column -compact -offset indent "# Zone" "America/Menominee" "STDOFF" "RULES" "FORMAT" "[UNTIL]"
+.It # Zone	NAME	STDOFF	RULES	FORMAT	[UNTIL]
+.It Zone	America/Menominee	\&\-5:00	\&\-	EST	1973 Apr 29 2:00
+.It \&	\&	\&\-6:00	US	C%sT
 .El
 .Pp
 Here, an incorrect reading would be there were two clock changes on 1973-04-29,
-the first from 02:00 EST (\&-05) to 01:00 CST (\&-06),
-and the second an hour later from 02:00 CST (\&-06) to 03:00 CDT (\&-05).
+the first from 02:00 EST (\&\-05) to 01:00 CST (\&\-06),
+and the second an hour later from 02:00 CST (\&\-06) to 03:00 CDT (\&\-05).
 However,
-.Nm 
-interprets this more sensibly as a single transition from 02:00 CST (\&-05) to
-02:00 CDT (\&-05).
-.Pp
-A link line has the form
+.Nm
+interprets this more sensibly as a single transition from 02:00 CST (\&\-05) to
+02:00 CDT (\&\-05).
+.\"
+.\" Link Line
+.\"
+.Pp
+A
+.Sy link line
+has the form
 .Pp
-.Dl Link	TARGET			LINK-NAME
+.Bl -column -compact -offset indent "Link" "Europe/Istanbul" "Asia/Istanbul"
+.It Link	TARGET	LINK-NAME
+.El
 .Pp
 For example:
 .Pp
-.Dl Link	Europe/Istanbul	Asia/Istanbul
+.Bl -column -compact -offset indent "Link" "Europe/Istanbul" "Asia/Istanbul"
+.It Link	Europe/Istanbul	Asia/Istanbul
+.El
 .Pp
 The
-.Em TARGET
+.Ar TARGET
 field should appear as the
-.Em NAME
-field in some zone line.
+.Ar NAME
 field in some zone line or as the
-.Em LINK-NAME
+.Ar LINK-NAME
 field in some link line.
 The
-.Em LINK-NAME
+.Ar LINK-NAME
 field is used as an alternative name for that zone;
 it has the same syntax as a zone line's
-.Em NAME
+.Ar NAME
 field.
 Links can chain together, although the behavior is unspecified if a
 chain of one or more links does not terminate in a Zone name.
 A link line can appear before the line that defines the link target.
 For example:
-.Bl -column -offset indent ".Sy Link" ".Sy Greenwich" ".Sy G_M_T"
-.It Sy Link Ta Sy Greenwich Ta Sy G_M_T
-.It 
-.It Link Ta Sy Etc/GMT Ta Sy Greenwich
-.It Zone Ta Sy Etc/GMT 0 Ta Sy Ta Sy \*- GMT
+.Bl -column -offset indent "Link" "Greenwich" "Greenwich"
+.It Link	Greenwich	G_M_T
+.It Link	Etc/GMT	Greenwich
+.It Zone	Etc/GMT 0	\- GMT
 .El
+.Pp
 The two links are chained together, and G_M_T, Greenwich, and Etc/GMT
 all name the same zone.
 .Pp
@@ -684,42 +755,50 @@ Except for continuation lines,
 lines may appear in any order in the input.
 However, the behavior is unspecified if multiple zone or link lines
 define the same name.
-.Pp
+.\"
+.Ss Leap second file format
 The file that describes leap seconds can have leap lines and an
 expiration line.
-Leap lines have the following form:
+.\"
+.\" Leap Line
+.\"
+.Sy Leap lines
+have the following form:
 .Pp
-.Dl Leap	YEAR	MONTH	DAY	HH:MM:SS	CORR	R/S
+.Bl -column -compat -offset indent "Leap" "YEAR" "MONTH" "DAY" "HH:MM:SS" "CORR""R/S"
+.It Leap	YEAR	MONTH	DAY	HH:MM:SS	CORR	R/S
+.El
 .Pp
 For example:
 .Pp
-.Dl Leap	2016	Dec		31	23:59:60	+	S
+.Bl -column -compat -offset indent "Leap" "YEAR" "MONTH" "DAY" "HH:MM:SS" "CORR""R/S"
+.It Leap	2016	Dec	31	23:59:60	+	S
+.El
 .Pp
 The
-.Em YEAR ,
-.Em MONTH ,
-.Em DAY ,
+.Ar YEAR ,
+.Ar MONTH ,
+.Ar DAY ,
 and
-.Em HH:MM:SS
+.Ar HH:MM:SS
 fields tell when the leap second happened.
 The
-.Em CORR
+.Ar CORR
 field
 should be
-.Qq \&+
-if a second was added
-or
-.Qq \&-
+.Ql \&+
+if a second was added or
+.Ql \&\-
 if a second was skipped.
 The
-.Em R/S
+.Ar R/S
 field
 should be (an abbreviation of)
-.Qq Stationary
+.Ql Stationary
 if the leap second time given by the other fields should be interpreted as UTC
 or
 (an abbreviation of)
-.Qq Rolling
+.Ql Rolling
 if the leap second time given by the other fields should be interpreted as
 local (wall clock) time.
 .Pp
@@ -735,14 +814,23 @@ which means rolling leap seconds are not
 also, they are not supported if the
 .Fl r
 option is used.
+.\"
+.\" Expiration Line
+.\"
 .Pp
-The expiration line, if present, has the form:
+The
+.Sy expiration line ,
+if present, has the form:
 .Pp
-.Dl Expires	YEAR	MONTH	DAY	HH:MM:SS
+.Bl -column -compact -offset indent "Expires" "YEAR" "MONTH" "DAY" "HH:MM:SS"
+.It Expires	YEAR	MONTH	DAY	HH:MM:SS
+.El
 .Pp
 For example:
 .Pp
-.Dl Expires	2020	Dec		28	00:00:00
+.Bl -column -compact -offset indent "Expires" "YEAR" "MONTH" "DAY" "HH:MM:SS"
+.It Expires	2020	Dec	28	00:00:00
+.El
 .Pp
 The
 .Em YEAR ,
@@ -757,22 +845,22 @@ Here is an extended example of
 input, intended to illustrate many of its features.
 .Pp
 .Bl -column -compact -offset indent "# Rule" "Swiss" "FROM" "1995" "\&*" "Oct" "lastSun" "1:00u" "SAVE" "LETTER/S"
-.It # Rule	NAME	FROM	TO	\&-	IN	ON	AT	SAVE	LETTER/S
-.It Rule	Swiss	1941	1942	\&-	May	Mon>=1	1:00	1:00	S
-.It Rule	Swiss	1941	1942	\&-	Oct	Mon>=1	2:00	0	-
-.Pp
-.It Rule	EU	1977	1980	\&-	Apr	Sun>=1	1:00u	1:00	S
-.It Rule	EU	1977	only	\&-	Sep	lastSun	1:00u	0	-
-.It Rule	EU	1978	only	\&-	Oct	 1	1:00u	0	-
-.It Rule	EU	1979	1995	\&-	Sep	lastSun	1:00u	0	-
-.It Rule	EU	1981	max	\&-	Mar	lastSun	1:00u	1:00	S
-.It Rule	EU	1996	max	\&-	Oct	lastSun	1:00u	0	-
+.It # Rule	NAME	FROM	TO	\&\-	IN	ON	AT	SAVE	LETTER/S
+.It Rule	Swiss	1941	1942	\&\-	May	Mon>=1	1:00	1:00	S
+.It Rule	Swiss	1941	1942	\&\-	Oct	Mon>=1	2:00	0	\-
+.Pp
+.It Rule	EU	1977	1980	\&\-	Apr	Sun>=1	1:00u	1:00	S
+.It Rule	EU	1977	only	\&\-	Sep	lastSun	1:00u	0	\-
+.It Rule	EU	1978	only	\&\-	Oct	 1	1:00u	0	\-
+.It Rule	EU	1979	1995	\&\-	Sep	lastSun	1:00u	0	\-
+.It Rule	EU	1981	max	\&\-	Mar	lastSun	1:00u	1:00	S
+.It Rule	EU	1996	max	\&\-	Oct	lastSun	1:00u	0	\-
 .El
 .Pp
 .Bl -column -compact -offset indent "# Zone" "Europe/Zurich" "0:29:45.50" "RULES/SAVE" "FORMAT" "UNTIL"
 .It # Zone	NAME	STDOFF	RULES/SAVE	FORMAT	[UNTIL]
-.It Zone	Europe/Zurich	0:34:08	\&-	LMT	1853 Jul 16
-.It 		0:29:45.50	\&-	BMT	1894 Jun
+.It Zone	Europe/Zurich	0:34:08	\&\-	LMT	1853 Jul 16
+.It 		0:29:45.50	\&\-	BMT	1894 Jun
 .It 		1:00	Swiss	CE%sT	1981
 .It 		1:00	EU	CE%sT
 .Pp
@@ -795,7 +883,7 @@ and Swiss daylight saving rules (defined
 .Qq "Rule Swiss"
 apply.
 From 1981 to the present, EU daylight saving rules have
-From 1981 to the present, EU daylight saving rules have
+applied, and the UTC offset has remained at one hour.
 .Pp
 In 1941 and 1942, daylight saving time applied from the first Monday
 in May at 01:00 to the first Monday in October at 02:00.
@@ -819,16 +907,16 @@ time.
 Input files use the format described in this section; output files use
 .Xr tzfile 5
 format.
-.Bl -tag -width /usr/share/zoneinfo -compact
+.Bl -tag -width Pa -compact
 .It Pa /etc/localtime
-Default local timezone file    
+Default local timezone file
 .It Pa /usr/share/zoneinfo
 Default timezone information directory
 .El
 .Sh NOTES
 For areas with more than two types of local time,
 you may need to use local standard time in the
-.Em AT
+.Ar AT
 field of the earliest transition time's rule to ensure that
 the earliest transition time recorded in the compiled file is correct.
 .Pp
@@ -837,7 +925,7 @@ for a particular timezone,
 a clock advance caused by the start of daylight saving
 coincides with and is equal to
 a clock retreat caused by a change in UT offset,
-.Ic zic
+.Nm
 produces a single transition to daylight saving at the new UT offset
 without any change in local (wall clock) time.
 To get separate transitions

Reply via email to