TZ

Simon Bowring pmmail@rpglink.com
Mon, 20 Mar 2000 17:31:33 +0000 (GMT)


On Mon, 20 Mar 2000 12:44:29 -0400 (AST), Trevor Smith wrote:

>Couldn't one "fix" the libraries or some OS/2 system file or
>something so that every time a program used whatever standard API
>call it uses to get the time from OS/2, the TZ variable was applied
>before OS/2 sent the info to the application?

Sadly not, because timezone support is not in the OS/2 operating
system at all - there are no OS/2 APIs to do with timezones and
daylight savings time, this support is provided by compiler vendors
within their own C runtime libraries (this is the root cause of 
my assertion that you have to run in local time!).

A C runtime library is supplied by a C compiler vendor, then
when a programmer writes a C program, the library is gets
linked with each and every program (i.e. the library gets 
physically built into each and every .EXE and many .DLLs).

[The C RTL is also supplied as a DLL, but this does not
actually solve anything for reasons I won't go into unless
you ask me, this disussion is confusing enough already!]

Basically, your PC is littered with programs and DLLs containing 
code to work out UTC from the local time, some of this code will be
from IBM, some may be from Watcom, some from MS, and the code may 
vary a little across different versions of the same compiler.

Effectively, each program is handling timezones and DST within
itself, not within a common place in a system library or within 
the OS itself (as should happen) - this is arguably unforgivable
(or "crap" to use the technical term) of IBM to "forget" about 
timezones when desiging OS/2 "the connected client"!


Regards

Simon Bowring,                   | http://www.mpc-data.co.uk/
Senior Software Engineer,        | Tel: +44 1225 868228
MPC Data Limited                 | Fax: +44 1225 868191