Chapter 18. Timezone in Bering-uClibc

Revision History
Revision 0.12003-08-17espakman
Initial version
Revision History
Revision 0.22005-02-25espakman
Some improvements by Kory Krofft
Revision History
Revision 0.32005-02-27kp
add J. Nilo's findings

Table of Contents

Setting the timezone
Examples for TZ values
Specification of the TZ variable

Setting the timezone

In Bering-uClibc /etc/timezone and the whole zoneinfo directory tree are not supported. To set the timezone, edit /etc/TZ file and set the timezone in a single line, ending with a newline, as specified in http://www.opengroup.org/onlinepubs/007904975/basedefs/xbd_chap08.html.

Warning

Be shure to have no empty line at the end /etc/TZ - in that case your timezone will be set to back UTC.

For example: CST6CDT means Central Standard Time which is 6 hours earlier than Coordinated Universal Time (UTC) and that standard rules for adjustment to Daylight Savings Time are to be applied. The first letters preceding the offset are actually nothing more than the descriptor used by programs such as "date" when displaying the time. Use whatever letters are meaningful in your area. The offset number is what is used to actually calculate the difference from UTC. The last three letters again can be anything that represents a meaningful adjustment to the offset given. A "tongue in cheek" example:

MCT-6CDT

is "legal" and might refer to Martian Canal Time which is defined as being 6 hours later than Coordinated Universal Time (UTC) and modified by one hour to Canal Savings Time on the standard date.