1*bc421551SDag-Erling Smørgrav.\" This file is in the public domain, so clarified as of 2*bc421551SDag-Erling Smørgrav.\" 2009-05-17 by Arthur David Olson. 3*bc421551SDag-Erling Smørgrav.Dd December 15, 2022 4*bc421551SDag-Erling Smørgrav.Dt ZDUMP 8 5*bc421551SDag-Erling Smørgrav.Os 6*bc421551SDag-Erling Smørgrav.Sh NAME 7*bc421551SDag-Erling Smørgrav.Nm zdump 8*bc421551SDag-Erling Smørgrav.Nd timezone dumper 9*bc421551SDag-Erling Smørgrav.Sh SYNOPSIS 10*bc421551SDag-Erling Smørgrav.Nm 11*bc421551SDag-Erling Smørgrav.Op Fl -help 12*bc421551SDag-Erling Smørgrav.Op Fl -version 13*bc421551SDag-Erling Smørgrav.Op Fl ivV 14*bc421551SDag-Erling Smørgrav.Oo 15*bc421551SDag-Erling Smørgrav.Fl c 16*bc421551SDag-Erling Smørgrav.Op Ar loyear , Ns 17*bc421551SDag-Erling Smørgrav.Ar hiyear 18*bc421551SDag-Erling Smørgrav.Oc 19*bc421551SDag-Erling Smørgrav.Oo 20*bc421551SDag-Erling Smørgrav.Fl t 21*bc421551SDag-Erling Smørgrav.Op Ar lotime , Ns 22*bc421551SDag-Erling Smørgrav.Ar hitime 23*bc421551SDag-Erling Smørgrav.Oc 24*bc421551SDag-Erling Smørgrav.Op Ar timezone ... 25*bc421551SDag-Erling Smørgrav.Sh DESCRIPTION 26*bc421551SDag-Erling SmørgravThe 27*bc421551SDag-Erling Smørgrav.Nm 28*bc421551SDag-Erling Smørgravprogram prints the current time in each 29*bc421551SDag-Erling Smørgrav.Ar timezone 30*bc421551SDag-Erling Smørgravnamed on the command line. 31*bc421551SDag-Erling Smørgrav.Pp 32*bc421551SDag-Erling SmørgravThe following options are available: 33*bc421551SDag-Erling Smørgrav.Bl -tag -width indent 34*bc421551SDag-Erling Smørgrav.It Fl -version 35*bc421551SDag-Erling SmørgravOutput version information and exit. 36*bc421551SDag-Erling Smørgrav.It Fl -help 37*bc421551SDag-Erling SmørgravOutput short usage message and exit. 38*bc421551SDag-Erling Smørgrav.It Fl i 39*bc421551SDag-Erling SmørgravOutput a description of time intervals. 40*bc421551SDag-Erling SmørgravFor each 41*bc421551SDag-Erling Smørgrav.Ar timezone 42*bc421551SDag-Erling Smørgravon the command line, output an interval-format description of the 43*bc421551SDag-Erling Smørgravtimezone. 44*bc421551SDag-Erling SmørgravSee 45*bc421551SDag-Erling Smørgrav.Sx "INTERVAL FORMAT" 46*bc421551SDag-Erling Smørgravbelow. 47*bc421551SDag-Erling Smørgrav.It Fl v 48*bc421551SDag-Erling SmørgravOutput a verbose description of time intervals. 49*bc421551SDag-Erling SmørgravFor each 50*bc421551SDag-Erling Smørgrav.Ar timezone 51*bc421551SDag-Erling Smørgravon the command line, 52*bc421551SDag-Erling Smørgravprint the times at the two extreme time values, 53*bc421551SDag-Erling Smørgravthe times (if present) at and just beyond the boundaries of years that 54*bc421551SDag-Erling Smørgrav.Xr localtime 3 55*bc421551SDag-Erling Smørgravand 56*bc421551SDag-Erling Smørgrav.Xr gmtime 3 57*bc421551SDag-Erling Smørgravcan represent, and 58*bc421551SDag-Erling Smørgravthe times both one second before and exactly at 59*bc421551SDag-Erling Smørgraveach detected time discontinuity. 60*bc421551SDag-Erling SmørgravEach line is followed by 61*bc421551SDag-Erling Smørgrav.Cm isdst= Ns Ar D 62*bc421551SDag-Erling Smørgravwhere 63*bc421551SDag-Erling Smørgrav.Ar D 64*bc421551SDag-Erling Smørgravis positive, zero, or negative depending on whether 65*bc421551SDag-Erling Smørgravthe given time is daylight saving time, standard time, 66*bc421551SDag-Erling Smørgravor an unknown time type, respectively. 67*bc421551SDag-Erling SmørgravEach line is also followed by 68*bc421551SDag-Erling Smørgrav.Cm gmtoff= Ns Ar N 69*bc421551SDag-Erling Smørgravif the given local time is known to be 70*bc421551SDag-Erling Smørgrav.Ar N 71*bc421551SDag-Erling Smørgravseconds east of Greenwich. 72*bc421551SDag-Erling Smørgrav.It Fl V 73*bc421551SDag-Erling SmørgravLike 74*bc421551SDag-Erling Smørgrav.Fl v , 75*bc421551SDag-Erling Smørgravexcept omit output concerning extreme time and year values. 76*bc421551SDag-Erling SmørgravThis generates output that is easier to compare to that of 77*bc421551SDag-Erling Smørgravimplementations with different time representations. 78*bc421551SDag-Erling Smørgrav.It Fl c Oo Ar loyear , Oc Ns Ar hiyear 79*bc421551SDag-Erling SmørgravCut off interval output at the given year(s). 80*bc421551SDag-Erling SmørgravCutoff times are computed using the proleptic Gregorian calendar with year 0 81*bc421551SDag-Erling Smørgravand with Universal Time (UT) ignoring leap seconds. 82*bc421551SDag-Erling SmørgravCutoffs are at the start of each year, where the lower-bound 83*bc421551SDag-Erling Smørgravtimestamp is inclusive and the upper is exclusive; for example, 84*bc421551SDag-Erling Smørgrav.Ql "-c 1970,2070" 85*bc421551SDag-Erling Smørgravselects transitions on or after 1970-01-01 00:00:00 UTC 86*bc421551SDag-Erling Smørgravand before 2070-01-01 00:00:00 UTC. 87*bc421551SDag-Erling SmørgravThe default cutoff is 88*bc421551SDag-Erling Smørgrav.Ql -500,2500 . 89*bc421551SDag-Erling Smørgrav.It Fl t Oo Ar lotime , Oc Ns Ar hitime 90*bc421551SDag-Erling SmørgravCut off interval output at the given time(s), 91*bc421551SDag-Erling Smørgravgiven in decimal seconds since 1970-01-01 00:00:00 92*bc421551SDag-Erling SmørgravCoordinated Universal Time (UTC). 93*bc421551SDag-Erling SmørgravThe 94*bc421551SDag-Erling Smørgrav.Ar timezone 95*bc421551SDag-Erling Smørgravdetermines whether the count includes leap seconds. 96*bc421551SDag-Erling SmørgravAs with 97*bc421551SDag-Erling Smørgrav.Fl c , 98*bc421551SDag-Erling Smørgravthe cutoff's lower bound is inclusive and its upper bound is exclusive. 99*bc421551SDag-Erling Smørgrav.El 100*bc421551SDag-Erling Smørgrav.Sh "INTERVAL FORMAT" 101*bc421551SDag-Erling SmørgravThe interval format is a compact text representation that is intended 102*bc421551SDag-Erling Smørgravto be both human- and machine-readable. 103*bc421551SDag-Erling SmørgravIt consists of an empty line, 104*bc421551SDag-Erling Smørgravthen a line 105*bc421551SDag-Erling Smørgrav.Dq "TZ=\fIstring\fP" 106*bc421551SDag-Erling Smørgravwhere 107*bc421551SDag-Erling Smørgrav.Ar string 108*bc421551SDag-Erling Smørgravis a double-quoted string giving the timezone, a second line 109*bc421551SDag-Erling Smørgrav.Dq "\*- \*- \fIinterval\fP" 110*bc421551SDag-Erling Smørgravdescribing the time interval before the first transition if any, and 111*bc421551SDag-Erling Smørgravzero or more following lines 112*bc421551SDag-Erling Smørgrav.Dq "\fIdate time interval\fP", 113*bc421551SDag-Erling Smørgravone line for each transition time and following interval. 114*bc421551SDag-Erling SmørgravFields are 115*bc421551SDag-Erling Smørgravseparated by single tabs. 116*bc421551SDag-Erling Smørgrav.Pp 117*bc421551SDag-Erling SmørgravDates are in 118*bc421551SDag-Erling Smørgrav.Ql "yyyy - mm - dd" 119*bc421551SDag-Erling Smørgravformat and times are in 24-hour 120*bc421551SDag-Erling Smørgrav.Ql "hh : mm : ss" 121*bc421551SDag-Erling Smørgravformat where 122*bc421551SDag-Erling Smørgrav.Ql "hh <24" . 123*bc421551SDag-Erling SmørgravTimes are in local time immediately after the transition. 124*bc421551SDag-Erling SmørgravA 125*bc421551SDag-Erling Smørgravtime interval description consists of a UT offset in signed 126*bc421551SDag-Erling Smørgrav.Ql "\(+- hhmmss" 127*bc421551SDag-Erling Smørgravformat, a time zone abbreviation, and an isdst flag. 128*bc421551SDag-Erling SmørgravAn abbreviation 129*bc421551SDag-Erling Smørgravthat equals the UT offset is omitted; other abbreviations are 130*bc421551SDag-Erling Smørgravdouble-quoted strings unless they consist of one or more alphabetic 131*bc421551SDag-Erling Smørgravcharacters. 132*bc421551SDag-Erling SmørgravAn isdst flag is omitted for standard time, and otherwise 133*bc421551SDag-Erling Smørgravis a decimal integer that is unsigned and positive (typically 1) for 134*bc421551SDag-Erling Smørgravdaylight saving time and negative for unknown. 135*bc421551SDag-Erling Smørgrav.Pp 136*bc421551SDag-Erling SmørgravIn times and in UT offsets with absolute value less than 100 hours, 137*bc421551SDag-Erling Smørgravthe seconds are omitted if they are zero, and 138*bc421551SDag-Erling Smørgravthe minutes are also omitted if they are also zero. 139*bc421551SDag-Erling SmørgravPositive UT 140*bc421551SDag-Erling Smørgravoffsets are east of Greenwich. 141*bc421551SDag-Erling SmørgravThe UT offset \*-00 denotes a UT 142*bc421551SDag-Erling Smørgravplaceholder in areas where the actual offset is unspecified; by 143*bc421551SDag-Erling Smørgravconvention, this occurs when the UT offset is zero and the time zone 144*bc421551SDag-Erling Smørgravabbreviation begins with 145*bc421551SDag-Erling Smørgrav.Dq "-" 146*bc421551SDag-Erling Smørgravor is 147*bc421551SDag-Erling Smørgrav.Dq "zzz". 148*bc421551SDag-Erling Smørgrav.Pp 149*bc421551SDag-Erling SmørgravIn double-quoted strings, escape sequences represent unusual 150*bc421551SDag-Erling Smørgravcharacters. 151*bc421551SDag-Erling SmørgravThe escape sequences are \es for space, and \e", \e\e, 152*bc421551SDag-Erling Smørgrav\ef, \en, \er, \et, and \ev with their usual meaning in the C 153*bc421551SDag-Erling Smørgravprogramming language. 154*bc421551SDag-Erling SmørgravE.g., the double-quoted string 155*bc421551SDag-Erling Smørgrav\*(lq"CET\es\e"\e\e"\*(rq represents the character sequence \*(lqCET 156*bc421551SDag-Erling Smørgrav"\e\*(rq.\"" 157*bc421551SDag-Erling Smørgrav.Pp 158*bc421551SDag-Erling SmørgravHere is an example of the output, with the leading empty line omitted. 159*bc421551SDag-Erling Smørgrav(This example is shown with tab stops set far enough apart so that the 160*bc421551SDag-Erling Smørgravtabbed columns line up.) 161*bc421551SDag-Erling Smørgrav.Bd -literal -offset indent 162*bc421551SDag-Erling SmørgravTZ="Pacific/Honolulu" 163*bc421551SDag-Erling Smørgrav- - -103126 LMT 164*bc421551SDag-Erling Smørgrav1896-01-13 12:01:26 -1030 HST 165*bc421551SDag-Erling Smørgrav1933-04-30 03 -0930 HDT 1 166*bc421551SDag-Erling Smørgrav1933-05-21 11 -1030 HST 167*bc421551SDag-Erling Smørgrav1942-02-09 03 -0930 HWT 1 168*bc421551SDag-Erling Smørgrav1945-08-14 13:30 -0930 HPT 1 169*bc421551SDag-Erling Smørgrav1945-09-30 01 -1030 HST 170*bc421551SDag-Erling Smørgrav1947-06-08 02:30 -10 HST 171*bc421551SDag-Erling Smørgrav.Ed 172*bc421551SDag-Erling Smørgrav.Pp 173*bc421551SDag-Erling SmørgravHere, local time begins 10 hours, 31 minutes and 26 seconds west of 174*bc421551SDag-Erling SmørgravUT, and is a standard time abbreviated LMT. 175*bc421551SDag-Erling SmørgravImmediately after the 176*bc421551SDag-Erling Smørgravfirst transition, the date is 1896-01-13 and the time is 12:01:26, and 177*bc421551SDag-Erling Smørgravthe following time interval is 10.5 hours west of UT, a standard time 178*bc421551SDag-Erling Smørgravabbreviated HST. 179*bc421551SDag-Erling SmørgravImmediately after the second transition, the date is 180*bc421551SDag-Erling Smørgrav1933-04-30 and the time is 03:00:00 and the following time interval is 181*bc421551SDag-Erling Smørgrav9.5 hours west of UT, is abbreviated HDT, and is daylight saving time. 182*bc421551SDag-Erling SmørgravImmediately after the last transition the date is 1947-06-08 and the 183*bc421551SDag-Erling Smørgravtime is 02:30:00, and the following time interval is 10 hours west of 184*bc421551SDag-Erling SmørgravUT, a standard time abbreviated HST. 185*bc421551SDag-Erling Smørgrav.Pp 186*bc421551SDag-Erling SmørgravHere are excerpts from another example: 187*bc421551SDag-Erling Smørgrav.Bd -literal -offset indent 188*bc421551SDag-Erling SmørgravTZ="Europe/Astrakhan" 189*bc421551SDag-Erling Smørgrav- - +031212 LMT 190*bc421551SDag-Erling Smørgrav1924-04-30 23:47:48 +03 191*bc421551SDag-Erling Smørgrav1930-06-21 01 +04 192*bc421551SDag-Erling Smørgrav1981-04-01 01 +05 1 193*bc421551SDag-Erling Smørgrav1981-09-30 23 +04 194*bc421551SDag-Erling Smørgrav\&... 195*bc421551SDag-Erling Smørgrav2014-10-26 01 +03 196*bc421551SDag-Erling Smørgrav2016-03-27 03 +04 197*bc421551SDag-Erling Smørgrav.Ed 198*bc421551SDag-Erling Smørgrav.Pp 199*bc421551SDag-Erling SmørgravThis time zone is east of UT, so its UT offsets are positive. 200*bc421551SDag-Erling SmørgravAlso, 201*bc421551SDag-Erling Smørgravmany of its time zone abbreviations are omitted since they duplicate 202*bc421551SDag-Erling Smørgravthe text of the UT offset. 203*bc421551SDag-Erling Smørgrav.Sh LIMITATIONS 204*bc421551SDag-Erling SmørgravTime discontinuities are found by sampling the results returned by 205*bc421551SDag-Erling Smørgrav.Xr localtime 3 206*bc421551SDag-Erling Smørgravat twelve-hour intervals. 207*bc421551SDag-Erling SmørgravThis works in all real-world cases; 208*bc421551SDag-Erling Smørgravone can construct artificial time zones for which this fails. 209*bc421551SDag-Erling Smørgrav.Pp 210*bc421551SDag-Erling SmørgravIn the 211*bc421551SDag-Erling Smørgrav.Fl v 212*bc421551SDag-Erling Smørgravand 213*bc421551SDag-Erling Smørgrav.Fl V 214*bc421551SDag-Erling Smørgravoutput, 215*bc421551SDag-Erling Smørgrav.Dq "UT" 216*bc421551SDag-Erling Smørgravdenotes the value returned by 217*bc421551SDag-Erling Smørgrav.Xr gmtime 3 , 218*bc421551SDag-Erling Smørgravwhich uses UTC for modern timestamps and some other UT flavor for 219*bc421551SDag-Erling Smørgravtimestamps that predate the introduction of UTC. 220*bc421551SDag-Erling SmørgravNo attempt is currently made to have the output use 221*bc421551SDag-Erling Smørgrav.Dq "UTC" 222*bc421551SDag-Erling Smørgravfor newer and 223*bc421551SDag-Erling Smørgrav.Dq "UT" 224*bc421551SDag-Erling Smørgravfor older timestamps, partly because the exact date of the 225*bc421551SDag-Erling Smørgravintroduction of UTC is problematic. 226*bc421551SDag-Erling Smørgrav.Sh SEE ALSO 227*bc421551SDag-Erling Smørgrav.Xr tzfile 5 , 228*bc421551SDag-Erling Smørgrav.Xr zic 8 229