|
The TZ VariableThe TZ variable is used by the date command and some Standard C library functions to determine time zone information. The simplest setting for TZ is a time zone name of three or more alphabetic characters followed by a number that specifies the number of hours that must be added to the local time to arrive at Coordinated Universal Time, also known as Greenwich Mean Time. This number can be positive (local time zone is west of 0 longitude) or negative (local time zone is east of 0 longitude). For example, Eastern Standard Time can be specified as
The date command calculates the correct time based on this information and also uses the time zone name in its output:
A second time zone name can follow the number; if this time zone is specified, daylight savings time is assumed to apply (date automatically adjusts the time in this case when daylight saving is in effect) and is assumed to be one hour earlier than standard time. If a number follows the daylight saving time zone name, this value is used to compute the daylight savings time from the Coordinated Universal Time in the same way as the number previously described. So, the following TZ settings are quivalent:
The TZ variable is usually set in either the /etc/profile file or your .profile file. If not set, an implementation-specific default time zone is used, typically Coordinated Universal Time. |
|
No comments:
Post a Comment