NAME
tzselect - 选择一个时区
总览
tzselect
描述
tzselect 程序向用户询问当前位置的信息,把时区描述作为结果输出到标准输出。此结果适合作为环境变量 TZ 的值。
所有与用户的交互是通过标准输入和标准错误输出完成的。
环境变量
- AWK
- 一个 Posix 兼容的 awk 程序的名字(缺省: awk).
- TZDIR
- 包含时区数据文件的目录的名字 (缺省: /usr/local/etc/zoneinfo).
文件
- TZDIR/iso3166.tab
- 包含国家(地区)编码和名称的 ISO 3166 2-字母表。
- TZDIR/zone.tab
- 国家(地区)代码表,包含经度和纬度,TZ(时区)值,描述性的注释。
- TZDIR/TZ
- 关于时区的时区数据文件 TZ.
退出状态
若从用户获得了正确的时区退出状态返回 0,否则非 0。
参见
newctime(3), tzfile(5), zdump(8), zic(8)
#p#
NAME
tzselect - select a time zone
SYNOPSIS
tzselect
DESCRIPTION
The 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.
All interaction with the user is done via standard input and standard error.
ENVIRONMENT VARIABLES
- AWK
- Name of a Posix-compliant awk program (default: awk).
- TZDIR
- Name of the directory containing time zone data files (default: /usr/local/etc/zoneinfo).
FILES
- TZDIR/iso3166.tab
- Table of ISO 3166 2-letter country codes and country names.
- TZDIR/zone.tab
- Table of country codes, latitude and longitude, TZ values, and descriptive comments.
- TZDIR/TZ
- Time zone data file for time zone TZ.
EXIT STATUS
The exit status is zero if a time zone was successfully obtained from the user, nonzero otherwise.
SEE ALSO
newctime(3), tzfile(5), zdump(8), zic(8)