-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtzselect.8
161 lines (161 loc) · 4.21 KB
/
tzselect.8
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
.TH TZSELECT 8
.SH NAME
tzselect \- select a time zone
.SH SYNOPSIS
.B tzselect
[
.B \-c
.I coord
] [
.B \-n
.I limit
] [
.B \-t
.I zonetabtype
] [
.B \-\-help
] [
.B \-\-version
]
.SH DESCRIPTION
The
.B tzselect
program asks the user for information about the current location,
and outputs the resulting time zone description to standard output.
The output is suitable as a value for the TZ environment variable.
.PP
All interaction with the user is done via standard input and standard error.
.SH OPTIONS
.TP
.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
.I coord.
Use ISO 6709 notation for
.I coord,
that is, a latitude immediately followed by a longitude. The latitude
and longitude should be signed integers followed by an optional
decimal point and fraction: positive numbers represent north and east,
negative south and west. Latitudes with two and longitudes with three
integer digits are treated as degrees; latitudes with four or six and
longitudes with five or seven integer digits are treated as
.I "DDMM, DDDMM, DDMMSS,"
or
.I DDDMMSS
representing
.I DD
or
.I DDD
degrees,
.I MM
minutes,
and zero or
.I SS
seconds, with any trailing fractions represent fractional minutes or
(if
.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"
specifies 40.689\(de\|N, 74.045\(de\|W,
.B "\-c\ +4041.4\-07402.7"
specifies 40\(de\|41.4\(fm\|N, 74\(de\|2.7\(fm\|W, and
.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
When
.B \-c
is used, display the closest
.I limit
locations (default 10).
.TP
.BI "\-t " zonetabtype
Make selections from the time zone table of type
.I zonetabtype.
Possible
.I zonetabtype
values include:
.RS
.TP
.B time
A time zone table with a smaller set of zone names.
.TP
.B zone
A time zone table that also contains alternative zone names, for
backward compatibility with older versions of this software. The
alternative names are not needed for proper operation of time stamps;
they are present only to avoid surprises with people who are
accustomed to the old names. These alternative names arose from
political issues that are outside the scope of
.BR tzselect .
.PP
For example, both tables have entries for countries like
Bosnia, Croatia, and Serbia, which are in a zone where the clocks
have all agreed since 1970. Although the
.B time
table lists "Europe/Belgrade" for this zone wherever it occurs, the
.B zone
table instead lists the names "Europe/Sarajevo", "Europe/Zagreb",
etc. under Bosnia, Croatia, etc. This means that the
.B "\-t\ time"
option causes
.B tzselect
to generate "Europe/Belgrade" for this zone, whereas
.B "\-t\ zone"
causes it to generate different names depending on the country,
names that are equivalent in effect to "Europe/Belgrade".
.PP
The default
.I zonetabtype
is system-dependent, so applications that care about the set of
names that
.B tzselect
generates should use the
.B "\-t"
option. Regardless of what options are used, applications should not
assume that
.BR tzselect 's
output matches the user's political preferences.
.RE
.TP
.B "\-\-help"
Output help information and exit.
.TP
.B "\-\-version"
Output version information and exit.
.SH "ENVIRONMENT VARIABLES"
.TP
\f3AWK\fP
Name of a Posix-compliant
.I awk
program (default:
.BR awk ).
.TP
\f3TZDIR\fP
Name of the directory containing time zone data files (default:
.BR /usr/local/etc/zoneinfo ).
.SH FILES
.TP
\f2TZDIR\fP\f3/iso3166.tab\fP
Table of ISO 3166 2-letter country codes and country names.
.TP
\f2TZDIR\fP\f3/time.tab\fP
.TP
\f2TZDIR\fP\f3/zone.tab\fP
Tables of country codes, latitude and longitude, zone names, and
descriptive comments.
.TP
\f2TZDIR\fP\f3/\fP\f2TZ\fP
Time zone data file for time zone \f2TZ\fP.
.SH "EXIT STATUS"
The exit status is zero if a time zone was successfully obtained from the user,
nonzero otherwise.
.SH "SEE ALSO"
newctime(3), tzfile(5), zdump(8), zic(8)
.\" This file is in the public domain, so clarified as of
.\" 2009-05-17 by Arthur David Olson.