Merge illumos-gate
[unleashed.git] / contrib / tzcode / tzselect.8
blobfb39e1f678fd9abf4cc1679cc900dc98214d48b8
1 .TH TZSELECT 8
2 .SH NAME
3 tzselect \- select a time zone
4 .SH SYNOPSIS
5 .ie \n(.g .ds - \f(CW-\fP
6 .el ds - \-
7 .B tzselect
9 .B \*-c
10 .I coord
11 ] [
12 .B \*-n
13 .I limit
14 ] [
15 .B \*-\*-help
16 ] [
17 .B \*-\*-version
19 .SH DESCRIPTION
20 The
21 .B tzselect
22 program asks the user for information about the current location,
23 and outputs the resulting time zone description to standard output.
24 The output is suitable as a value for the TZ environment variable.
25 .PP
26 All interaction with the user is done via standard input and standard error.
27 .SH OPTIONS
28 .TP
29 .BI "\*-c " coord
30 Instead of asking for continent and then country and then city,
31 ask for selection from time zones whose largest cities
32 are closest to the location with geographical coordinates
33 .I coord.
34 Use ISO 6709 notation for
35 .I coord,
36 that is, a latitude immediately followed by a longitude.  The latitude
37 and longitude should be signed integers followed by an optional
38 decimal point and fraction: positive numbers represent north and east,
39 negative south and west.  Latitudes with two and longitudes with three
40 integer digits are treated as degrees; latitudes with four or six and
41 longitudes with five or seven integer digits are treated as
42 .I "DDMM, DDDMM, DDMMSS,"
44 .I DDDMMSS
45 representing
46 .I DD
48 .I DDD
49 degrees,
50 .I MM
51 minutes,
52 and zero or
53 .I SS
54 seconds, with any trailing fractions represent fractional minutes or
55 (if
56 .I SS
57 is present) seconds.  The decimal point is that of the current locale.
58 For example, in the (default) C locale,
59 .B "\*-c\ +40.689\*-074.045"
60 specifies 40.689\(de\|N, 74.045\(de\|W,
61 .B "\*-c\ +4041.4\*-07402.7"
62 specifies 40\(de\|41.4\(fm\|N, 74\(de\|2.7\(fm\|W, and
63 .B "\*-c\ +404121\*-0740240"
64 specifies 40\(de\|41\(fm\|21\(sd\|N, 74\(de\|2\(fm\|40\(sd\|W.
66 .I coord
67 is not one of the documented forms, the resulting behavior is unspecified.
68 .TP
69 .BI "\*-n " limit
70 When
71 .B \*-c
72 is used, display the closest
73 .I limit
74 locations (default 10).
75 .TP
76 .B "\*-\*-help"
77 Output help information and exit.
78 .TP
79 .B "\*-\*-version"
80 Output version information and exit.
81 .SH "ENVIRONMENT VARIABLES"
82 .TP
83 \f3AWK\fP
84 Name of a Posix-compliant
85 .I awk
86 program (default:
87 .BR awk ).
88 .TP
89 \f3TZDIR\fP
90 Name of the directory containing time zone data files (default:
91 .BR /usr/local/etc/zoneinfo ).
92 .SH FILES
93 .TP
94 \f2TZDIR\fP\f3/iso3166.tab\fP
95 Table of ISO 3166 2-letter country codes and country names.
96 .TP
97 \f2TZDIR\fP\f3/zone1970.tab\fP
98 Table of country codes, latitude and longitude, zone names, and
99 descriptive comments.
101 \f2TZDIR\fP\f3/\fP\f2TZ\fP
102 Time zone data file for time zone \f2TZ\fP.
103 .SH "EXIT STATUS"
104 The exit status is zero if a time zone was successfully obtained from the user,
105 nonzero otherwise.
106 .SH "SEE ALSO"
107 newctime(3), tzfile(5), zdump(8), zic(8)
108 .SH NOTES
109 Applications should not assume that
110 .BR tzselect 's
111 output matches the user's political preferences.
112 .\" This file is in the public domain, so clarified as of
113 .\" 2009-05-17 by Arthur David Olson.