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

Поиск
Список
Период
Сортировка
От Thomas Lockhart
Тема Re: AW: Re: tinterval - operator problems on AIX
Дата
Msg-id 3A5C7504.515E6C2B@alumni.caltech.edu
обсуждение исходный текст
Ответ на AW: Re: tinterval - operator problems on AIX  (Zeugswetter Andreas SB <ZeugswetterA@wien.spardat.at>)
Ответы Re: AW: Re: tinterval - operator problems on AIX  (Pete Forman <pete.forman@westerngeco.com>)
Список 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


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Oleg Bartunov
Дата:
Сообщение: RD-Tree, index support for int array (contrib-intarray)
Следующее
От: Pete Forman
Дата:
Сообщение: Re: AW: Re: tinterval - operator problems on AIX