TZ... Again (OT)

Simon Bowring pmmail@rpglink.com
Wed, 29 Mar 2000 15:54:53 +0100 (BST)


>Do you know when OS/2 uses the the TZ variable to actually *change*
>the time??  
Oh, no, no, no. No it doesn't, and is not supposed to!

>I've never seen it work in all the years I've run it. 
Indeed, for the good and well reasoned argument stated above ;-)

OS/2 does not ever adjust your PC's hardware clock ("realtime clock"
or RTC), neither does it ever change it's internal "software" 
clock that is initialised from the RTC at boot, and then
subsequently maintained independently of the RTC while OS/2
is up and running. OS/2 Commands that set the time, affect only
this independent software clock, and NOT the realtime clock.

There is no API in OS/2 to set the real CMOS RTC!

<pedantic>
*OS/2* doesn't really use TZ at all, many of it's *applications*
(including the tcp/ip apps shipped), use TZ to calculate UTC/GMT 
from the local time AND to allow them to know when daylight savings 
time comes into and goes out of effect. Thus such apps are able to 
"know" or display the "complete" time and date including the 
timezone name and whether daylight savings time is currently in 
effect or not.
</pedantic>

So, after a time change, one ought to go into the BIOS setup 
(the next convenient reboot will do) and set the RTC to the 
correct local time (i.e. what your watch says!).  

Changes using the "time" or "net time" commands or from packages 
such as DST switch (and probably timekeeper/2 - I've not seen it),
do *not* get saved to the hardware clock. So you should do this 
regardless of running DST switch etc (but check your timekeeper/2
docs to be sure).

Many OS/2 users knowingly or unknowingly synchronise their OS/2 
clock with that of a server - it's done on every netware login
for example.  

Provided the server is set-up ok, this is fine and will keep your clock 
accurate (at the next sync).

If you have a correctly configured server (NT, OS/2 or Unix running 
samba) available, then you can schedule a:

   "net time \\server_name /set /y" 

command to run every night at 01:01 and 02:01. This will remove 
the need for timekeeper/2 or DST switch (but you need a scheduler 
program)!

Simon