AW: AW: Re: tinterval - operator problems on AIX

From: Zeugswetter Andreas SB <ZeugswetterA(at)wien(dot)spardat(dot)at>
To: "'lockhart(at)fourpalms(dot)org'" <lockhart(at)fourpalms(dot)org>
Cc: "'pgsql-hackers(at)postgresql(dot)org'" <pgsql-hackers(at)postgresql(dot)org>
Subject: AW: AW: Re: tinterval - operator problems on AIX
Date: 2001-01-10 17:26:55
Message-ID: 11C1E6749A55D411A9670001FA6879633681A3@sdexcsrv1.f000.d0188.sd.spardat.at
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


> > On AIX mktime(3) leaves tm_isdst at -1 if it does not have timezone
> > info for that particular year and returns -1.
> > The following code then makes savings time out of the -1.
> > tz = (tm->tm_isdst ? (timezone - 3600) : timezone);
>
> Hmm. That description is consistant with what I see in the Linux man
> page. So I should check for (tm->tm_isdst > 0) rather than
> checking for non-zero?

It is obviously not possible to determine tm_isdst with mktime for a
negative time_t. Thus with above fix PST works, but PDT is then busted :-(
localtime does convert a negative time_t correctly including dst.
Is there another way to determine tm_isdst ?

Andreas

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2001-01-10 17:55:21 Re: Re: Beta2 ... ?
Previous Message Lamar Owen 2001-01-10 17:03:03 Re: Re: Beta2 ... ?