----- Original Message -----
From: "DJ Delorie" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Monday, April 16, 2001 12:00 PM
Subject: Re: I'm working on libgcj...
>
> > What spec is timezone() derived from?
>
> Timezone is one of those "traditionally different" things. I don't
> recall exactly which OS defined it the cygwin way, but it's not
> uncommon to define it that way.
>
Thanks. The bit of code I'm fighting with is
#ifdef STRUCT_TM_HAS_GMTOFF
tzoffset = -(tim->tm_gmtoff); // tm_gmtoff is secs EAST of UTC.
#elif HAVE_TIMEZONE
tzoffset = timezone; // timezone is secs WEST of UTC.
#else
// FIXME: there must be another global if neither tm_gmtoff nor
timezone
// is available, esp. if tzname is valid.
// Richard Earnshaw <[EMAIL PROTECTED]> has suggested using difftime to
// calculate between gmtime and localtime (and accounting for possible
// daylight savings time) as an alternative. Also note that this same
// issue exists in java/util/natGregorianCalendar.cc.
tzoffset = 0L;
#endif
And I was hoping to avoid putting a #ifdef __CYGWIN__ in there. I
presume the long term fix is to add tm_gmtoff to the timezone struct?
Rob