Question of time :-)

Guenther Grau Guenther.Grau at bk.bosch.de
Tue Apr 7 16:35:10 UTC 1998


Hi,

I don't know if this is correct address to send this to, but
I hope you'll be able to redirect me in case it's not :-)

In my application I need to know, the time difference
between any given time in any given timezone, and UTC. Is
this possible to do WITHOUT changing the TZ environment
variable? I cannot do this, because this is in a multithreaded
program, and changing TZ would affect other threads.
I cannot fork another process, as this takes too much time
and resources.

I need a program, that does sth. like this:
> echo $TZ
MET
> date
Tue Apr  7 18:31:42 MET DST 1998
> calculateUtcDifference "1.2.1998 12:13 EST"
5 hours

I would be great if you knew a portable solution
(solaris/hp-ux).

Thanx in advance

  Guenther



More information about the tz mailing list