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

From: Thomas Lockhart <lockhart(at)alumni(dot)caltech(dot)edu>
To: Zeugswetter Andreas SB <ZeugswetterA(at)wien(dot)spardat(dot)at>
Cc: "'lockhart(at)fourpalms(dot)org'" <lockhart(at)fourpalms(dot)org>, "'pgsql-hackers(at)postgresql(dot)org'" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: AW: Re: tinterval - operator problems on AIX
Date: 2001-01-10 14:43:16
Message-ID: 3A5C7504.515E6C2B@alumni.caltech.edu
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?

Would you like to test that on your machine? I'll try it here, and if
successful will consider this a bug report and a necessary fix for 7.1.

It is interesting that this is the only place in all of our code which
tickles this bug; afaik this line of code appears in other places too.
Can you find a case where the current code fails when you are not doing
arithmetic? Perhaps there are some more tests we could include in the
regression tests??

It is also interesting that afaik AIX is the only machine exhibiting
this problem. The before-1970 range of dates is known to occur in some
use cases, and having *something* in the timezone database isn't that
difficult :/

- Thomas

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Pete Forman 2001-01-10 15:45:38 Re: AW: Re: tinterval - operator problems on AIX
Previous Message Oleg Bartunov 2001-01-10 14:20:50 RD-Tree, index support for int array (contrib-intarray)