AW: AW: AW: AW: Re: tinterval - operator problems on AIX - Mailing list pgsql-hackers

From Zeugswetter Andreas SB
Subject AW: AW: AW: AW: Re: tinterval - operator problems on AIX
Date
Msg-id 11C1E6749A55D411A9670001FA6879633681AD@sdexcsrv1.f000.d0188.sd.spardat.at
Whole thread Raw
List pgsql-hackers
> > > How about having some #if BROKEN_TIMEZONE_DATABASE code which uses both
> > > mktime() and localtime() to derive the correct time zone? That is, call
> > > mktime to get a time_t, then call localtime() to get the time zone info,
> > > but only on platforms which do not get a complete result from just the
> > > call to mktime(). In fact, we *could* check for tm->tm_isdst coming back
> > > "-1" for every platform, then call localtime() to make a last stab at
> > > getting a good value.
> > How would we construct a valid time_t from the struct tm 
> without mktime?
> 
> If I understand the info you have given previously, it should be
> possible to get a valid tm->tm_isdst by the following 
> sequence of calls:
> 
> // call mktime() which might return a "-1" for DST
> time = mktime(tm);
> // time is now a correct GMT time

Unfortunately the returned time is -1 for all dates before 1970 
(on AIX and, as I understood, IRIX) :-( 
(can you send someone from IBM, that I can shout at, to releive my anger)

Andreas


pgsql-hackers by date:

Previous
From: "Vadim Mikheev"
Date:
Subject: Re: Pg7.1beta3: connect failed: The DB System is starting up.
Next
From: "Valter Mazzola"
Date:
Subject: Re: Pg7.1beta3: connect failed: The DB System is starting up.