Re: BUG #4528: (rounding?) error with some timezone names

Lists: pgsql-bugs
From: "chris wood" <chrisj(dot)wood(at)sympatico(dot)ca>
To: pgsql-bugs(at)postgresql(dot)org
Subject: BUG #4528: (rounding?) error with some timezone names
Date: 2008-11-13 14:44:38
Message-ID: 200811131444.mADEic9F008792@wwwmaster.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-bugs


The following bug has been logged online:

Bug reference: 4528
Logged by: chris wood
Email address: chrisj(dot)wood(at)sympatico(dot)ca
PostgreSQL version: 8.3.4
Operating system: Debian
Description: (rounding?) error with some timezone names
Details:

again sorry I do not have access to 8.3.5, but it should be a quick check
for anyone who does.

postgresbugs=# select version() ;
version
----------------------------------------------------------------------------
----------------
PostgreSQL 8.3.4 on i486-pc-linux-gnu, compiled by GCC gcc-4.3.real (Debian
4.3.2-1) 4.3.2
(1 row)

postgresbugs=# select * from pg_catalog.pg_timezone_names where name =
'right/Pacific/Wake' ;
name | abbrev | utc_offset | is_dst
--------------------+--------+------------+--------
right/Pacific/Wake | WAKT | 12:00:00 | f
(1 row)

postgresbugs=# select '2008-01-09 07:00:00-00'::timestamptz at time zone
'right/Pacific/Wake' ;
timezone
---------------------
2008-01-09 18:59:37 <<<<<<<<<???????
(1 row)

postgresbugs=# select '2008-01-09 07:00:00-00'::timestamptz at time zone
'WAKT' ;
timezone
---------------------
2008-01-09 19:00:00
(1 row)

In version 8.3.1 there were 586 timezone names that manifest a similar
error.


From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "chris wood" <chrisj(dot)wood(at)sympatico(dot)ca>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #4528: (rounding?) error with some timezone names
Date: 2008-11-13 14:54:42
Message-ID: 18680.1226588082@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-bugs

"chris wood" <chrisj(dot)wood(at)sympatico(dot)ca> writes:
> postgresbugs=# select '2008-01-09 07:00:00-00'::timestamptz at time zone
> 'right/Pacific/Wake' ;
> timezone
> ---------------------
> 2008-01-09 18:59:37 <<<<<<<<<???????
> (1 row)

The "right" timezones take leap seconds into account, so this isn't
surprising.

(We don't actually support leap seconds, so I wonder whether we
shouldn't filter those zones out of the view. They're not there at all
if you set up Postgres to use an internal tz database, but I suppose we
have to accept that they're likely to be present in a system-supplied tz
database.)

regards, tom lane