BUG #3816: Timezone bug

Started by Geert Bijloosover 18 years ago3 messagesbugs
Jump to latest
#1Geert Bijloos
geert.bijloos@aeronomie.be

The following bug has been logged online:

Bug reference: 3816
Logged by: Geert Bijloos
Email address: geert.bijloos@aeronomie.be
PostgreSQL version: 8.1.3 and 8.2.4
Operating system: Linux
Description: Timezone bug
Details:

Try this

SET TIMEZONE TO 'CET';
SELECT (timestamp with time zone '2000-01-01 UT' + interval '86 days 0 hours
5 min 0 sec') at time zone 'UT';

"2000-03-26 23:05:00" -> WRONG

SET TIMEZONE TO 'UTC';
SELECT (timestamp with time zone '2000-01-01 UT' + interval '86 days 0 hours
5 min 0 sec') at time zone 'UT';

"2000-03-27 00:05:00" -> RIGHT

It can be reproduced for several timezones.

#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: Geert Bijloos (#1)
Re: BUG #3816: Timezone bug

"Geert Bijloos" <geert.bijloos@aeronomie.be> writes:

Try this

SET TIMEZONE TO 'CET';
SELECT (timestamp with time zone '2000-01-01 UT' + interval '86 days 0 hours
5 min 0 sec') at time zone 'UT';

"2000-03-26 23:05:00" -> WRONG

On what grounds do you claim that that's wrong?

regards, tom lane

#3Bruce Momjian
bruce@momjian.us
In reply to: Geert Bijloos (#1)
Re: BUG #3816: Timezone bug

"Geert Bijloos" <geert.bijloos@aeronomie.be> writes:

The following bug has been logged online:

PostgreSQL version: 8.1.3 and 8.2.4
Description: Timezone bug

Without actually checking whether the results are wrong I'll note that several
of the changes in the bug-fix releases post 8.1.3 and 8.2.4 are timezone
updates.

(And since 8.1.3 there were several crashing and data eating bugs fixed in
those bug-fix releases)

--
Gregory Stark
EnterpriseDB http://www.enterprisedb.com
Ask me about EnterpriseDB's PostGIS support!