On Mon, Apr 10, 2006 at 02:20:08PM +0200, Antoine Jacoutot wrote:
> Back to this thread again.
> So, after chatting with some OpenBSD devs, the included patch should fix the
> issue.
> It would be nice to officialy include it, if the fix is OK with you (and maybe
> with an #ifdef in case it only applies to OpenBSD).
The glibc documentation says: "The `tm_gmtoff' field is derived from BSD
and is a GNU library extension; it is not visible in a strict ISO C
environment." So it should be OK for Linux and *BSD, but may still need
an autoconf feature test for other platforms.
Also, the meaning of tm_gmtoff is not the same as the global timezone
variable:
-- Variable: long int timezone
[...]
Unlike the `tm_gmtoff' member of the broken-down time structure,
this value is not adjusted for daylight saving, and its sign is
reversed. In GNU programs it is better to use `tm_gmtoff',
since it contains the correct offset even when it is not the
latest one.
Gabor
--
---------------------------------------------------------
MTA SZTAKI Computer and Automation Research Institute
Hungarian Academy of Sciences
---------------------------------------------------------
----
Cyrus Home Page: http://asg.web.cmu.edu/cyrus
Cyrus Wiki/FAQ: http://cyruswiki.andrew.cmu.edu
List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html