Subject: Still not fixed...
From: [email-masked] (Keet / Foxbird)

11 Apr 1998 09:11:57 -0700
Message-ID: <[email-masked]>
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
To: [email-masked]

I thought I posted this quite some time ago, but it evidentally never made
it through to the list (funny how a lot of thigns don't make it through
recently). Anyway, this is something plenty of people have reported before,
but have never gotten a reply to as far as I can tell.

There is no tm_zone member in the TM struct nor an external array tzname to
get the name of the timezone. Also, the return of the tm_gmtoff (or extern
long timezone) is REALLY off.. when running a program and converting the
seconds it returns to the number of hours, days, mins, etc, I get some
obscene result like 3000 days 17 hours .... etc... here's a snippet that
handles the gmt_offset stuff (the defines are checked by a configure
script.. and neither HAVE_TM_GMTOFF of HAVE_SYS_TM_GMTOFF are defined:

long
get_tz_offset()
{
/*
 * SunOS don't seem to have timezone as a "extern long", but as
 * a structure. This makes it very hard (at best) to check for,
 * therefor I'm checking for tm_gmtoff. --WF
 */
#if defined(HAVE_TM_GMTOFF) || defined(HAVE_SYS_TM_GMTOFF)
    time_t now;

    time(&now);
    return (localtime(&now)->tm_gmtoff);
#else
    extern long timezone;

    return timezone;
#endif
}

I've got the src with me (got tired of an error in this server I'm running
and decided to look at it), but can't find hide nor hair of it (then agian,
I'm not a Win32 programmer, just a wannabe).. any help on this matter is
GREATLY appreciated.

- Greg Neujahr

-
For help on using this list (especially unsubscribing), send a message to
"[email-masked]" with one line of text: "help".