On Thu, Aug 22, 2002 at 04:04:23PM +0300, Oded Arbel wrote:
> 
> > -----Original Message-----
> > From: Vibhu Mohindra [mailto:[EMAIL PROTECTED]]
> > Sent: Thursday, August 22, 2002 2:03 PM
> > To: [EMAIL PROTECTED]
> > Subject: Re: [PATCH] SMPP validity
> > 
> > 
> > If the issue is solely with locatime_r(), but using localtime() and
> > the returned struct's tm_gmtoff is alright then let's do that rather
> 
> No it's not. that was the point of my previous post. using tm_gmtoff is
> a much word portability braker then using localtime_r().

A final attempt from me for us to use the underlying OS's library :-)
Why don't we use the older global variable timezone that gets set upon
return from a localtime() or gmtime() call. Other than being globally
accessible by all threads, the only difference w.r.t. tm.tm_gmtoff is
that it doesn't take into account DST. You've mentioned that localtime()
should reflect that anyway, so we're OK on that count.

After a call to localtime(),

    printf("%ld\n", -timezone/3600);

tells me I'm +6 UTC.

Vibhu

Attachment: msg04720/pgp00000.pgp
Description: PGP signature

Reply via email to