Mail Archives: cygwin-apps/2001/04/15/22:02:19
----- Original Message -----
From: "DJ Delorie" <dj AT delorie DOT com>
To: <robert DOT collins AT itdomain DOT com DOT au>
Cc: <cygwin-apps AT sources DOT redhat DOT com>
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
tzoffset = -(tim->tm_gmtoff); // tm_gmtoff is secs EAST of UTC.
tzoffset = timezone; // timezone is secs WEST of UTC.
// FIXME: there must be another global if neither tm_gmtoff nor
// is available, esp. if tzname is valid.
// Richard Earnshaw <rearnsha AT arm DOT com> 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;
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?
- Raw text -