Setting the time zone – HP Integrity NonStop J-Series User Manual

Page 70

Advertising
background image

Click on the banner to return to the user guide home page.

©Copyright 1996 Rogue Wave Software

Setting the Time Zone

The question naturally arises, how does the library determine this local time?

The UNIX operating system provides for setting the local time zone and for establishing
whether DST is locally observed. Class

RWTime

uses various system calls to determine these

values and sets itself accordingly. Class RWTime should function properly in North America or
places where DST is not observed. In places not governed by United States DST rules, you may
need to re-initialize the local time zone; see

RWZone

in the Class Reference.

Users of the various Windows operating systems may have to set the time switches manually.
How you do this depends on your compiler. If you do nothing, the class will function properly
for local time, but may not give the proper GMT because the computer has no way of knowing
the offset from local time to GMT.

If you use Borland, MetaWare, Microsoft, Symantec, or Watcom, you must set your
environment variable TZ to the appropriate time zone. For example:

set TZ=PST8PDT

For further information, see the documentation for function tzset()or _tzset() in your compiler's
run-time library reference.

Finally, it is essential that your computer's system clock be set and functioning correctly. If you
are using a PC, be sure the batteries that power the system clock are charged.

Advertising
This manual is related to the following products: