
QNX BACKGROUND INFORMATION
TIME ZONES AND THE REAL-TIME CLOCK
I-E96-107-2N
D - 7
Establishing the Time Zone
The time zone information should be established before the
current date and time is set. If the real-time clock in your com-
puter has been set to local time, QNX needs the time zone
information in order to establish UTC.
In the following example, the time zone as well as the time
change rules are set for Eastern Standard Time in North
America:
export TZ=est5DST4,M4.1.0/3,M10.5.0/3
Where:
Getting the Date and Time from the Real-Time Clock
If you are booting from disk, you should follow the first line in
your system initialization file with the “rtc” utility to establish
the current date and time from the real-time clock. The follow-
ing two lines would accomplish this:
export TZ=EST5DST4,M4.1.0/3,M10.5.0/3
rtc hw
This will set the date and time on an IBM AT-compatible com-
puter.
Note that there are two possible approaches to take when set-
ting the real-time clock in your machine:
•
Setting the real-time clock to UTC.
•
Setting the real-time clock to local time.
We recommend that you set the time in the real-time clock to
UTC. But if you are also running operating systems that
assume the real-time clock is set to local time (e.g., DOS).
export
Shell command to set an environment variable.
TZ
Name of variable.
EST
Eastern Standard Time.
5
Five hours before Greenwich Mean Time.
DST
Daylight Savings Time.
4
Four hours before Greenwich Mean Time.
M4.1.0/3
First Sunday of April at 3 am.
M10.5.0/3
Last Sunday of October at 3 am.