This is the mail archive of the mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: I'm working on libgcj...

----- Original Message -----
From: "DJ Delorie" <>
To: <>
Cc: <>
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 <> 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/
  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?


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]