diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2014-06-28 16:35:14 -0700 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2014-06-28 16:37:21 -0700 |
commit | 468555e32de1fcf6a35ca6abc05f53233b261762 (patch) | |
tree | 6feba05c1bc9fa4ea4f7c443ed10977cd413eef9 | |
parent | 8f065f5aa9afe5d1600e62092c8b63dd592cd21e (diff) | |
download | tz-468555e32de1fcf6a35ca6abc05f53233b261762.tar.gz |
Fix glitches with '-' and italics in man pages.
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.
-rw-r--r-- | date.1 | 36 | ||||
-rw-r--r-- | newctime.3 | 40 | ||||
-rw-r--r-- | newstrftime.3 | 22 | ||||
-rw-r--r-- | newtzset.3 | 28 | ||||
-rw-r--r-- | time2posix.3 | 4 | ||||
-rw-r--r-- | tzfile.5 | 2 | ||||
-rw-r--r-- | tzselect.8 | 26 | ||||
-rw-r--r-- | zdump.8 | 30 | ||||
-rw-r--r-- | zic.8 | 90 |
9 files changed, 136 insertions, 142 deletions
@@ -4,24 +4,26 @@ date \- show and set date and time .SH SYNOPSIS .if n .nh .if n .na +.ie \n(.g .ds - \f(CW-\fP +.el ds - \- .B date [ -.B \-u +.B \*-u ] [ -.B \-c +.B \*-c ] [ -.B \-r -seconds +.B \*-r +.I seconds ] [ -.B \-n +.B \*-n ] [ -.B \-d -dsttype +.B \*-d +.I dsttype ] [ -.B \-t -minutes-west +.B \*-t +.I minutes-west ] [ -\fB\-a \fR[\fB+\fR|\fB-]\fIsss\fB.\fIfff\fR +\fB\*-a \fR[\fB+\fR|\fB\*-]\fIsss\fB.\fIfff\fR ] [ .BI + format ] [ @@ -141,10 +143,10 @@ the seconds part of the new time; if no seconds are given, zero is assumed. .PP These options are available: .TP -.BR \-u " or " \-c +.BR \*-u " or " \*-c Use Universal Time when setting and showing the date and time. .TP -.BI "\-r " seconds +.BI "\*-r " seconds Output the date that corresponds to .I seconds past the epoch of 1970-01-01 00:00:00 UTC, where @@ -152,16 +154,16 @@ past the epoch of 1970-01-01 00:00:00 UTC, where should be an integer, either decimal, octal (leading 0), or hexadecimal (leading 0x), preceded by an optional sign. .TP -.B \-n +.B \*-n Do not notify other networked systems of the time change. .TP -.BI "\-d " dsttype +.BI "\*-d " dsttype Set the kernel-stored Daylight Saving Time type to the given value. (The kernel-stored DST type is used mostly by .q "old" binaries.) .TP -.BI "\-t " minutes-west +.BI "\*-t " minutes-west Set the kernel-stored .q "minutes west of UTC" value to the one given on the @@ -170,10 +172,10 @@ command line. .q "old" binaries.) .TP -.BI "\-a " adjustment +.BI "\*-a " adjustment Change the time forward (or backward) by the number of seconds (and fractions thereof) specified in the -.I adjustment\^ +.I adjustment argument. Either the seconds part or the fractions part of the argument (but not both) may be omitted. @@ -3,6 +3,8 @@ asctime, ctime, difftime, gmtime, localtime, mktime \- convert date and time .SH SYNOPSIS .nf +.ie \n(.g .ds - \f(CW-\fP +.el ds - \- .B extern char *tzname[2]; .PP .B void tzset() @@ -30,7 +32,7 @@ asctime, ctime, difftime, gmtime, localtime, mktime \- convert date and time .B time_t mktime(tm) .B struct tm *tm; .PP -.B cc ... -ltz +.B cc ... \*-ltz .fi .SH DESCRIPTION .ie '\(en'' .ds en \- @@ -42,7 +44,7 @@ asctime, ctime, difftime, gmtime, localtime, mktime \- convert date and time .de q \\$3\*(lq\\$1\*(rq\\$2 .. -.I Ctime\^ +.I Ctime converts a long integer, pointed to by .IR clock , and returns a pointer to a @@ -77,13 +79,13 @@ and can therefore represent time stamps that predate the introduction of UTC and are some other flavor of Universal Time (UT). Some implementations support leap seconds, in contradiction to POSIX. .PP -.I Localtime\^ +.I Localtime and -.I gmtime\^ +.I gmtime return pointers to .q "tm" structures, described below. -.I Localtime\^ +.I Localtime corrects for the time zone and any time zone adjustments (such as Daylight Saving Time in the United States). After filling in the @@ -98,17 +100,17 @@ to a pointer to a string that's the time zone abbreviation to be used with .IR localtime 's return value. .PP -.I Gmtime\^ +.I Gmtime converts to Coordinated Universal Time. .PP -.I Asctime\^ +.I Asctime converts a time value contained in a .q "tm" structure to a string, as shown in the above example, and returns a pointer to the string. .PP -.I Mktime\^ +.I Mktime converts the broken-down time, expressed as local time, in the structure pointed to by @@ -153,15 +155,15 @@ is not set until and .B tm_year are determined. -.I Mktime\^ +.I Mktime returns the specified calendar time; If the calendar time cannot be represented, -it returns \(mi1. +it returns \-1. .PP -.I Difftime\^ +.I Difftime returns the difference between two calendar times, .RI ( time1 -- +\- .IR time0 ), expressed in seconds. .PP @@ -169,7 +171,7 @@ Declarations of all the functions and externals, and the .q "tm" structure, are in the -.B <time.h>\^ +.B <time.h> header file. The structure (of type) .B struct tm @@ -183,7 +185,7 @@ includes the following fields: int tm_hour; /\(** hours (0\*(en23) \(**/ int tm_mday; /\(** day of month (1\*(en31) \(**/ int tm_mon; /\(** month of year (0\*(en11) \(**/ - int tm_year; /\(** year \(mi 1900 \(**/ + int tm_year; /\(** year \- 1900 \(**/ int tm_wday; /\(** day of week (Sunday = 0) \(**/ int tm_yday; /\(** day of year (0\*(en365) \(**/ int tm_isdst; /\(** is summer time in effect? \(**/ @@ -202,7 +204,7 @@ created. There is no guarantee that these fields will continue to exist in this form in future releases of this code. .PP -.I Tm_isdst\^ +.I Tm_isdst is non-zero if summer time is in effect. .PP .I Tm_gmtoff @@ -243,18 +245,18 @@ will also be overwritten at the next call (and by calls to .IR tzset ). .PP -.I Asctime\^ +.I Asctime and -.I ctime\^ +.I ctime behave strangely for years before 1000 or after 9999. The 1989 and 1999 editions of the C Standard say -that years from \(mi99 through 999 are converted without +that years from \-99 through 999 are converted without extra spaces, but this conflicts with longstanding tradition and with this implementation. Traditional implementations of these two functions are restricted to years in the range 1900 through 2099. To avoid this portability mess, new programs should use -.I strftime\^ +.I strftime instead. .\" This file is in the public domain, so clarified as of .\" 2009-05-17 by Arthur David Olson. diff --git a/newstrftime.3 b/newstrftime.3 index dc9a348..7dd125c 100644 --- a/newstrftime.3 +++ b/newstrftime.3 @@ -42,6 +42,8 @@ strftime \- format date and time .SH SYNOPSIS .nf +.ie \n(.g .ds - \f(CW-\fP +.el ds - \- .B #include <sys/types.h> .B #include <time.h> .PP @@ -57,16 +59,16 @@ strftime \- format date and time .ie '\(en'' .ds en \- .el .ds en \(en The -.I strftime\^ +.I strftime function formats the information from -.I timeptr\^ +.I timeptr into the buffer -.I buf\^ +.I buf according to the string pointed to by -.IR format\^ . +.IR format . .PP The -.I format\^ +.I format string consists of zero or more conversion specifications and ordinary characters. All ordinary characters are copied directly into the buffer. @@ -75,12 +77,12 @@ A conversion specification consists of a percent sign and one other character. .PP No more than -.I maxsize\^ +.I maxsize characters are placed into the array. If the total number of resulting characters, including the terminating null character, is not more than -.IR maxsize\^ , -.I strftime\^ +.IR maxsize , +.I strftime returns the number of characters in the array, not counting the terminating null. Otherwise, zero is returned. @@ -118,7 +120,7 @@ is replaced by the day of month as a decimal number (1\*(en31); single digits are preceded by a blank. .TP %F -is replaced by the date in the format %Y-%m-%d. +is replaced by the date in the format %Y\*-%m\*-%d. .TP %G is replaced by the ISO 8601 year with century as a decimal number. @@ -214,7 +216,7 @@ or by the empty string if this is not determinable. .TP %z is replaced by the offset from the Prime Meridian -in the format +HHMM or \(miHHMM as appropriate, +in the format +HHMM or \*-HHMM as appropriate, with positive values representing locations east of Greenwich, or by the empty string if this is not determinable. .TP @@ -3,9 +3,11 @@ tzset \- initialize time conversion information .SH SYNOPSIS .nf +.ie \n(.g .ds - \f(CW-\fP +.el ds - \- .B void tzset() .PP -.B cc ... -ltz +.B cc ... \*-ltz .fi .SH DESCRIPTION .ie '\(en'' .ds en \- @@ -85,9 +87,9 @@ except a leading colon digits, comma .RB ( , ), ASCII minus -.RB ( \(mi ), +.RB ( \*- ), ASCII plus -.RB ( \(pl ), +.RB ( + ), and NUL bytes are allowed. .TP .I offset @@ -118,10 +120,10 @@ summer time is assumed to be one hour ahead of standard time. One or more digits may be used; the value is always interpreted as a decimal number. The hour must be between zero and 24, and the minutes (and seconds) \*(en if present \*(en between zero and 59. If preceded by a -.q "\fB-\fP" , +.q "\*-" , the time zone shall be east of the Prime Meridian; otherwise it shall be west (which may be indicated by an optional preceding -.q "\fB+\fP" . +.q "+" . .TP .I rule Indicates when to change to and back from summer time. The @@ -189,12 +191,12 @@ The has the same format as .I offset except that POSIX does not allow a leading sign (\c -.q "\fB-\fP" +.q "\*-" or -.q "\fB+\fP" ). +.q "+" ). As an extension to POSIX, the hours part of .I time -can range from \(mi167 through 167; this allows for unusual rules such +can range from \-167 through 167; this allows for unusual rules such as .q "the Saturday before the first Sunday of March" . The default, if @@ -212,14 +214,14 @@ extensions to POSIX. stands for US Eastern Standard Time (EST), 5 hours behind UTC, without daylight saving. .TP -.B FJT-12FJST,M10.3.1/146,M1.3.4/75 +.B FJT\*-12FJST,M10.3.1/146,M1.3.4/75 stands for Fiji Time (FJT) and Fiji Summer Time (FJST), 12 hours ahead of UTC, springing forward on October's third Monday at 146:00 (i.e., 02:00 on the first Sunday on or after October 21), and falling back on January's third Thursday at 75:00 (i.e., 03:00 on the first Sunday on or after January 18). .TP -.B IST-2IDT,M3.4.4/26,M10.5.0 +.B IST\*-2IDT,M3.4.4/26,M10.5.0 stands for Israel Standard Time (IST) and Israel Daylight Time (IDT), 2 hours ahead of UTC, springing forward on March's fourth Thursday at 26:00 (i.e., 02:00 on the first Friday on or after March @@ -235,12 +237,12 @@ all year and the initial .B WART is a placeholder. .TP -.B WGT3WGST,M3.5.0/-2,M10.5.0/-1 +.B WGT3WGST,M3.5.0/\*-2,M10.5.0/\*-1 stands for Western Greenland Time (WGT) and Western Greenland Summer Time (WGST), 3 hours behind UTC, where clocks follow the EU rules of -springing forward on March's last Sunday at 01:00 UTC (\(mi02:00 local +springing forward on March's last Sunday at 01:00 UTC (\-02:00 local time) and falling back on October's last Sunday at 01:00 UTC -(\(mi01:00 local time). +(\-01:00 local time). .PP If no .I rule diff --git a/time2posix.3 b/time2posix.3 index c02b1a2..d689608 100644 --- a/time2posix.3 +++ b/time2posix.3 @@ -3,6 +3,8 @@ time2posix, posix2time \- convert seconds since the Epoch .SH SYNOPSIS .nf +.ie \n(.g .ds - \f(CW-\fP +.el ds - \- .B #include <sys/types.h> .B #include <time.h> .PP @@ -12,7 +14,7 @@ time2posix, posix2time \- convert seconds since the Epoch .B time_t posix2time(t) .B time_t t .PP -.B cc ... -ltz +.B cc ... \*-ltz .fi .SH DESCRIPTION .ie '\(en'' .ds en \- @@ -144,7 +144,7 @@ For version-3-format time zone files, the POSIX-TZ-style string may use two minor extensions to the POSIX TZ format, as described in .IR newtzset (3). First, the hours part of its transition times may be signed and range from -\(mi167 through 167 instead of the POSIX-required unsigned values +\-167 through 167 instead of the POSIX-required unsigned values from 0 through 24. Second, DST is in effect all year if it starts January 1 at 00:00 and ends December 31 at 24:00 plus the difference between daylight saving and standard time. @@ -2,17 +2,19 @@ .SH NAME tzselect \- select a time zone .SH SYNOPSIS +.ie \n(.g .ds - \f(CW-\fP +.el ds - \- .B tzselect [ -.B \-c +.B \*-c .I coord ] [ -.B \-n +.B \*-n .I limit ] [ -.B \-\-help +.B \*-\*-help ] [ -.B \-\-version +.B \*-\*-version ] .SH DESCRIPTION The @@ -24,7 +26,7 @@ The output is suitable as a value for the TZ environment variable. All interaction with the user is done via standard input and standard error. .SH OPTIONS .TP -.BI "\-c " coord +.BI "\*-c " coord Instead of asking for continent and then country and then city, ask for selection from time zones whose largest cities are closest to the location with geographical coordinates @@ -54,19 +56,19 @@ seconds, with any trailing fractions represent fractional minutes or .I SS is present) seconds. The decimal point is that of the current locale. For example, in the (default) C locale, -.B "\-c\ +40.689\-074.045" +.B "\*-c\ +40.689\*-074.045" specifies 40.689\(de\|N, 74.045\(de\|W, -.B "\-c\ +4041.4\-07402.7" +.B "\*-c\ +4041.4\*-07402.7" specifies 40\(de\|41.4\(fm\|N, 74\(de\|2.7\(fm\|W, and -.B "\-c\ +404121\-0740240" +.B "\*-c\ +404121\*-0740240" specifies 40\(de\|41\(fm\|21\(sd\|N, 74\(de\|2\(fm\|40\(sd\|W. If .I coord is not one of the documented forms, the resulting behavior is unspecified. .TP -.BI "\-n " limit +.BI "\*-n " limit When -.B \-c +.B \*-c is used, display the closest .I limit locations (default 10). @@ -76,10 +78,10 @@ Applications should not assume that output matches the user's political preferences. .RE .TP -.B "\-\-help" +.B "\*-\*-help" Output help information and exit. .TP -.B "\-\-version" +.B "\*-\*-version" Output version information and exit. .SH "ENVIRONMENT VARIABLES" .TP @@ -4,17 +4,13 @@ zdump \- time zone dumper .SH SYNOPSIS .B zdump [ -.B \-\-version -] [ -.B \-v -] [ -.B \-V -] [ -.B \-c -[loyear,]hiyear ] [ -.B \-t -[lotime,]hitime ] [ zonename ... ] +.I option +\&... ] [ +.I zonename +\&... ] .SH DESCRIPTION +.ie \n(.g .ds - \f(CW-\fP +.el ds - \- .I Zdump prints the current time in each .I zonename @@ -22,10 +18,10 @@ named on the command line. .PP These options are available: .TP -.BI "\-\-version" +.BI "\*-\*-version" Output version information and exit. .TP -.B \-v +.B \*-v For each .I zonename on the command line, @@ -41,20 +37,20 @@ if the given time is Daylight Saving Time or .B isdst=0 otherwise. .TP -.B \-V +.B \*-V Like -.BR \-v , +.BR \*-v , except omit the times relative to the extreme time values. This generates output that is easier to compare to that of implementations with different time representations. .TP -.BI "\-c " [loyear,]hiyear +.BI "\*-c " [loyear,]hiyear Cut off verbose output near the start of the given year(s). By default, the program cuts off verbose output near the starts of the years -\(mi500 and 2500. +\-500 and 2500. .TP -.BI "\-t " [lotime,]hitime +.BI "\*-t " [lotime,]hitime Cut off verbose output at the start of the given time(s), given in decimal seconds since 1970-01-01 00:00:00 UTC. .SH LIMITATIONS @@ -4,28 +4,8 @@ zic \- time zone compiler .SH SYNOPSIS .B zic [ -.B \-\-version -] -[ -.B \-v -] [ -.B \-d -.I directory -] [ -.B \-l -.I localtime -] [ -.B \-p -.I posixrules -] [ -.B \-L -.I leapsecondfilename -] [ -.B \-s -] [ -.B \-y -.I command -] [ +.I option +\&... ] [ .I filename \&... ] .SH DESCRIPTION @@ -40,27 +20,33 @@ zic \- time zone compiler .el .ds < \(la .ie '\(ra'' .ds > > .el .ds > \(ra -.ie \n(.g .ds : \: -.el .ds : +.ie \n(.g \{\ +. ds : \: +. ds - \f(CW-\fP +.\} +.el \{\ +. ds : +. el ds - \- +.\} .I Zic reads text from the file(s) named on the command line and creates the time conversion information files specified in this input. If a .I filename is -.BR \- , +.q "\*-" , the standard input is read. .PP These options are available: .TP -.BI "\-\-version" +.BI "\*-\*-version" Output version information and exit. .TP -.BI "\-d " directory +.BI "\*-d " directory Create time conversion information files in the named directory rather than in the standard directory named below. .TP -.BI "\-l " timezone +.BI "\*-l " timezone Use the given time zone as local time. .I Zic will act as if the input contained a link line of the form @@ -68,7 +54,7 @@ will act as if the input contained a link line of the form .ti +.5i Link \fItimezone\fP localtime .TP -.BI "\-p " timezone +.BI "\*-p " timezone Use the given time zone's rules when handling POSIX-format time zone environment variables. .I Zic @@ -77,12 +63,12 @@ will act as if the input contained a link line of the form .ti +.5i Link \fItimezone\fP posixrules .TP -.BI "\-L " leapsecondfilename +.BI "\*-L " leapsecondfilename Read leap second information from the file with the given name. If this option is not used, no leap second information appears in output files. .TP -.B \-v +.B \*-v Be more verbose, and complain about the following situations: .RS .PP @@ -120,21 +106,21 @@ A time zone abbreviation has fewer than 3 characters. POSIX requires at least 3. .PP An output file name contains a byte that is not an ASCII letter, -.q "-" , +.q "\*-" , .q "/" , or .q "_" ; or it contains a file name component that contains more than 14 bytes or that starts with -.q "-" . +.q "\*-" . .RE .TP -.B \-s +.B \*-s Limit time values stored in output files to values that are the same whether they're taken to be signed or unsigned. You can use this option to generate SVVS-compatible files. .TP -.BI "\-y " command +.BI "\*-y " command Use the given .I command rather than @@ -152,7 +138,7 @@ non-PPCS bytes. Non-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 -.B \-v +.B \*-v option. .PP Input lines are made up of fields. @@ -181,7 +167,7 @@ Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S For example: .ti +.5i .sp -Rule US 1967 1973 \- Apr lastSun 2:00 1:00 D +Rule US 1967 1973 \*- Apr lastSun 2:00 1:00 D .sp .fi The fields that make up a rule line are: @@ -221,7 +207,7 @@ Gives the type of year in which the rule applies. If .B TYPE is -.B \- +.q \*- then the rule applies in all years between .B FROM and @@ -274,7 +260,7 @@ Recognized forms include: 2:00 time in hours and minutes 15:00 24-hour format time (for times after noon) 1:28:14 time in hours, minutes, and seconds -\- equivalent to 0 +\*- equivalent to 0 .fi .in -.5i .sp @@ -323,7 +309,7 @@ or .q "EDT" ) of time zone abbreviations to be used when this rule is in effect. If this field is -.BR \- , +.q \*- , the variable part is null. .PP A zone line has the form @@ -365,7 +351,7 @@ begin the field with a minus sign if time must be subtracted from UT. The name of the rule(s) that apply in the time zone or, alternately, an amount of time to add to local standard time. If this field is -.B \- +.B \*- then standard time always applies in the time zone. .TP .B FORMAT @@ -461,7 +447,7 @@ should be .q "+" if a second was added or -.q "-" +.q "\*-" if a second was skipped. .\" There's no need to document the following, since it's impossible for more .\" than one leap second to be inserted or deleted at a time. @@ -496,20 +482,20 @@ input, intended to illustrate many of its features. .ta \w'# Rule\0\0'u +\w'NAME\0\0'u +\w'FROM\0\0'u +\w'1973\0\0'u +\w'TYPE\0\0'u +\w'Apr\0\0'u +\w'lastSun\0\0'u +\w'2:00\0\0'u +\w'SAVE\0\0'u .sp # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S -Rule Swiss 1941 1942 - May Mon>=1 1:00 1:00 S -Rule Swiss 1941 1942 - Oct Mon>=1 2:00 0 - +Rule Swiss 1941 1942 \*- May Mon>=1 1:00 1:00 S +Rule Swiss 1941 1942 \*- Oct Mon>=1 2:00 0 \*- .sp .5 -Rule EU 1977 1980 - Apr Sun>=1 1:00u 1:00 S -Rule EU 1977 only - Sep lastSun 1:00u 0 - -Rule EU 1978 only - Oct 1 1:00u 0 - -Rule EU 1979 1995 - Sep lastSun 1:00u 0 - -Rule EU 1981 max - Mar lastSun 1:00u 1:00 S -Rule EU 1996 max - Oct lastSun 1:00u 0 - +Rule EU 1977 1980 \*- Apr Sun>=1 1:00u 1:00 S +Rule EU 1977 only \*- Sep lastSun 1:00u 0 \*- +Rule EU 1978 only \*- Oct 1 1:00u 0 \*- +Rule EU 1979 1995 \*- Sep lastSun 1:00u 0 \*- +Rule EU 1981 max \*- Mar lastSun 1:00u 1:00 S +Rule EU 1996 max \*- Oct lastSun 1:00u 0 \*- .sp .ta \w'# Zone\0\0'u +\w'Europe/Zurich\0\0'u +\w'GMTOFF\0\0'u +\w'RULES/SAVE\0\0'u +\w'FORMAT\0\0'u # Zone NAME GMTOFF RULES/SAVE FORMAT UNTIL -Zone Europe/Zurich 0:34:08 - LMT 1853 Jul 16 - 0:29:46 - BMT 1894 Jun +Zone Europe/Zurich 0:34:08 \*- LMT 1853 Jul 16 + 0:29:46 \*- BMT 1894 Jun 1:00 Swiss CE%sT 1981 1:00 EU CE%sT .sp |