zdump.8 6.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231
  1. .\" This file is in the public domain, so clarified as of
  2. .\" 2009-05-17 by Arthur David Olson.
  3. .TH zdump 8 "" "Time Zone Database"
  4. .SH NAME
  5. zdump \- timezone dumper
  6. .SH SYNOPSIS
  7. .B zdump
  8. [
  9. .I option
  10. \&... ] [
  11. .I timezone
  12. \&... ]
  13. .SH DESCRIPTION
  14. .ie '\(lq'' .ds lq \&"\"
  15. .el .ds lq \(lq\"
  16. .ie '\(rq'' .ds rq \&"\"
  17. .el .ds rq \(rq\"
  18. .de q
  19. \\$3\*(lq\\$1\*(rq\\$2
  20. ..
  21. .ie \n(.g .ds - \f(CR-\fP
  22. .el .ds - \-
  23. The
  24. .B zdump
  25. program prints the current time in each
  26. .I timezone
  27. named on the command line.
  28. .SH OPTIONS
  29. .TP
  30. .B \*-\*-version
  31. Output version information and exit.
  32. .TP
  33. .B \*-\*-help
  34. Output short usage message and exit.
  35. .TP
  36. .B \*-i
  37. Output a description of time intervals. For each
  38. .I timezone
  39. on the command line, output an interval-format description of the
  40. timezone. See
  41. .q "INTERVAL FORMAT"
  42. below.
  43. .TP
  44. .B \*-v
  45. Output a verbose description of time intervals.
  46. For each
  47. .I timezone
  48. on the command line,
  49. print the times at the two extreme time values,
  50. the times (if present) at and just beyond the boundaries of years that
  51. .BR localtime (3)
  52. and
  53. .BR gmtime (3)
  54. can represent, and
  55. the times both one second before and exactly at
  56. each detected time discontinuity.
  57. Each line is followed by
  58. .BI isdst= D
  59. where
  60. .I D
  61. is positive, zero, or negative depending on whether
  62. the given time is daylight saving time, standard time,
  63. or an unknown time type, respectively.
  64. Each line is also followed by
  65. .BI gmtoff= N
  66. if the given local time is known to be
  67. .I N
  68. seconds east of Greenwich.
  69. .TP
  70. .B \*-V
  71. Like
  72. .BR \*-v ,
  73. except omit output concerning extreme time and year values.
  74. This generates output that is easier to compare to that of
  75. implementations with different time representations.
  76. .TP
  77. .BI "\*-c " \fR[\fIloyear , \fR]\fIhiyear
  78. Cut off interval output at the given year(s).
  79. Cutoff times are computed using the proleptic Gregorian calendar with year 0
  80. and with Universal Time (UT) ignoring leap seconds.
  81. Cutoffs are at the start of each year, where the lower-bound
  82. timestamp is inclusive and the upper is exclusive; for example,
  83. .B "\*-c 1970,2070"
  84. selects transitions on or after 1970-01-01 00:00:00 UTC
  85. and before 2070-01-01 00:00:00 UTC.
  86. The default cutoff is
  87. .BR \*-500,2500 .
  88. .TP
  89. .BI "\*-t " \fR[\fIlotime , \fR]\fIhitime
  90. Cut off interval output at the given time(s),
  91. given in decimal seconds since 1970-01-01 00:00:00
  92. Coordinated Universal Time (UTC).
  93. The
  94. .I timezone
  95. determines whether the count includes leap seconds.
  96. As with
  97. .BR \*-c ,
  98. the cutoff's lower bound is inclusive and its upper bound is exclusive.
  99. .SH "INTERVAL FORMAT"
  100. The interval format is a compact text representation that is intended
  101. to be both human- and machine-readable. It consists of an empty line,
  102. then a line
  103. .q "TZ=\fIstring\fP"
  104. where
  105. .I string
  106. is a double-quoted string giving the timezone, a second line
  107. .q "\*- \*- \fIinterval\fP"
  108. describing the time interval before the first transition if any, and
  109. zero or more following lines
  110. .q "\fIdate time interval\fP",
  111. one line for each transition time and following interval. Fields are
  112. separated by single tabs.
  113. .PP
  114. Dates are in
  115. .IR yyyy - mm - dd
  116. format and times are in 24-hour
  117. .IR hh : mm : ss
  118. format where
  119. .IR hh <24.
  120. Times are in local time immediately after the transition. A
  121. time interval description consists of a UT offset in signed
  122. .RI \(+- hhmmss
  123. format, a time zone abbreviation, and an isdst flag. An abbreviation
  124. that equals the UT offset is omitted; other abbreviations are
  125. double-quoted strings unless they consist of one or more alphabetic
  126. characters. An isdst flag is omitted for standard time, and otherwise
  127. is a decimal integer that is unsigned and positive (typically 1) for
  128. daylight saving time and negative for unknown.
  129. .PP
  130. In times and in UT offsets with absolute value less than 100 hours,
  131. the seconds are omitted if they are zero, and
  132. the minutes are also omitted if they are also zero. Positive UT
  133. offsets are east of Greenwich. The UT offset \*-00 denotes a UT
  134. placeholder in areas where the actual offset is unspecified; by
  135. convention, this occurs when the UT offset is zero and the time zone
  136. abbreviation begins with
  137. .q "\*-"
  138. or is
  139. .q "zzz".
  140. .PP
  141. In double-quoted strings, escape sequences represent unusual
  142. characters. The escape sequences are \es for space, and \e", \e\e,
  143. \ef, \en, \er, \et, and \ev with their usual meaning in the C
  144. programming language. E.g., the double-quoted string
  145. \*(lq"CET\es\e"\e\e"\*(rq represents the character sequence \*(lqCET
  146. "\e\*(rq.\""
  147. .PP
  148. .ne 9
  149. Here is an example of the output, with the leading empty line omitted.
  150. (This example is shown with tab stops set far enough apart so that the
  151. tabbed columns line up.)
  152. .nf
  153. .sp
  154. .if \n(.g .ft CR
  155. .if t .in +.5i
  156. .if n .in +2
  157. .nr w \w'1896-01-13 'u+\n(.i
  158. .ta \w'1896-01-13 'u +\w'12:01:26 'u +\w'-103126 'u +\w'HWT 'u
  159. TZ="Pacific/Honolulu"
  160. - - -103126 LMT
  161. 1896-01-13 12:01:26 -1030 HST
  162. 1933-04-30 03 -0930 HDT 1
  163. 1933-05-21 11 -1030 HST
  164. 1942-02-09 03 -0930 HWT 1
  165. 1945-08-14 13:30 -0930 HPT 1
  166. 1945-09-30 01 -1030 HST
  167. 1947-06-08 02:30 -10 HST
  168. .in
  169. .if \n(.g .ft
  170. .sp
  171. .fi
  172. Here, local time begins 10 hours, 31 minutes and 26 seconds west of
  173. UT, and is a standard time abbreviated LMT. Immediately after the
  174. first transition, the date is 1896-01-13 and the time is 12:01:26, and
  175. the following time interval is 10.5 hours west of UT, a standard time
  176. abbreviated HST. Immediately after the second transition, the date is
  177. 1933-04-30 and the time is 03:00:00 and the following time interval is
  178. 9.5 hours west of UT, is abbreviated HDT, and is daylight saving time.
  179. Immediately after the last transition the date is 1947-06-08 and the
  180. time is 02:30:00, and the following time interval is 10 hours west of
  181. UT, a standard time abbreviated HST.
  182. .PP
  183. .ne 10
  184. Here are excerpts from another example:
  185. .nf
  186. .sp
  187. .if \n(.g .ft CR
  188. .if t .in +.5i
  189. .if n .in +2
  190. TZ="Europe/Astrakhan"
  191. - - +031212 LMT
  192. 1924-04-30 23:47:48 +03
  193. 1930-06-21 01 +04
  194. 1981-04-01 01 +05 1
  195. 1981-09-30 23 +04
  196. \&...
  197. 2014-10-26 01 +03
  198. 2016-03-27 03 +04
  199. .in
  200. .if \n(.g .ft
  201. .sp
  202. .fi
  203. This time zone is east of UT, so its UT offsets are positive. Also,
  204. many of its time zone abbreviations are omitted since they duplicate
  205. the text of the UT offset.
  206. .SH LIMITATIONS
  207. Time discontinuities are found by sampling the results returned by
  208. .BR localtime (3)
  209. at twelve-hour intervals.
  210. This works in all real-world cases;
  211. one can construct artificial time zones for which this fails.
  212. .PP
  213. In the
  214. .B \*-v
  215. and
  216. .B \*-V
  217. output,
  218. .q "UT"
  219. denotes the value returned by
  220. .BR gmtime (3),
  221. which uses UTC for modern timestamps and some other UT flavor for
  222. timestamps that predate the introduction of UTC.
  223. No attempt is currently made to have the output use
  224. .q "UTC"
  225. for newer and
  226. .q "UT"
  227. for older timestamps, partly because the exact date of the
  228. introduction of UTC is problematic.
  229. .SH SEE ALSO
  230. .BR tzfile (5),
  231. .BR zic (8)