DCE Installation, Configuration, and Management Guide
Recommended Usage
HP NonStop DCE Installation, Configuration, and Management Guide—429552-005
6-5
Local Time Example 1
setting the TZ environment variable in the shell that starts dtscp. For example, to
show U.S. Pacific standard time, enter:
export TZ="PST8PDT"
This assignment can be automated for the OSS shell by assigning the environment
variable in the .profile file.
Alternatively, copy the appropriate binary time-zone file to
/etc/zoneinfo/localtime. For example:
cp /opt/dcelocal.hostname/etc/zoneinfo/US/Pacific
/etc/zoneinfo/localtime
where hostname is the name of the virtual host.
Information about daylight-saving time transitions is included in the time-zone files.
The local time-zone information does not affect the synchronization algorithm of a DTS
server. All times are stored internally in UTC.
Local Time Example 1
Suppose the local time zone is set to PST8PDT, which is U.S. Pacific standard time
(PST), and daylight-saving time is in effect. Setting the TZ environment variable
enables dtscp to display the time of other time zones:
/etc: dtscp show current time
Current Time = 1995-10-05-08:14:11.975-07:00I0.102
/etc: export TZ="GMT0BST"
/etc: dtscp show current time
Current Time = 1995-10-05-16:14:45.192+01:00I0.101
/etc: export TZ="GMT"
/etc: dtscp show current time
Current Time = 1995-10-05-15:15:13.831+00:00I0.102
Local Time Example 2
The OSS shell date command also reads the TZ environment variable, so setting TZ
also causes the date command to display the time for the specified time zone. For
example:
/usr/mikes: date
Thu Oct 5 08:28:45 PDT 1995
/usr/mikes: export TZ="GMT0BST"
/usr/mikes: date
Thu Oct 5 16:28:55 BST 1995
/usr/mikes: date -u
Thu Oct 5 15:28:59 UTC 1995
/usr/mikes: export TZ="GMT"
/usr/mikes: date
Thu Oct 5 15:29:08 GMT 1995