tzselect - select a timezone
tzselect [ -c coord ] [
-n limit ] [
--help ] [
The tzselect program asks the user for information about the current
location, and outputs the resulting timezone to standard output. The output is
suitable as a value for the TZ environment variable.
All interaction with the user is done via standard input and
- -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 coord. Use ISO 6709 notation for
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 DDMM,
DDDMM, DDMMSS, or DDDMMSS representing DD or DDD
degrees, MM minutes, and zero or SS seconds, with any
trailing fractions represent fractional minutes or (if SS is
present) seconds. The decimal point is that of the current locale. For
example, in the (default) C locale,
specifies 40.689°N, 74.045°W,
specifies 40°41.4′N, 74°2.7′W, and
specifies 40°41′21″N, 74°2′40″W.
If coord is not one of the documented forms, the resulting behavior
- -n limit
- When -c is used, display the closest
limit locations (default 10).
- Output help information and exit.
- Output version information and exit.
- Name of a Posix-compliant awk program (default: awk).
- Name of the directory containing timezone data files (default:
The exit status is zero if a timezone was successfully obtained from the user,
newctime(3), tzfile(5), zdump(8), zic(8)
Applications should not assume that tzselect's output matches the user's
- Table of ISO 3166 2-letter country codes and country names.
- Table of country codes, latitude and longitude, timezones, and descriptive
- Timezone data file for timezone TZ.