BUG #1649: Date calculation year off-by-one error

Started by Nicholas Vinenalmost 21 years ago2 messagesbugs
Jump to latest
#1Nicholas Vinen
hb@pg.x256.org

The following bug has been logged online:

Bug reference: 1649
Logged by: Nicholas Vinen
Email address: hb@pg.x256.org
PostgreSQL version: 8.0.1
Operating system: Gentoo Linux
Description: Date calculation year off-by-one error
Details:

This is definitely not right:

rt3=# SELECT date_trunc('week', timestamp with time zone '2005-01-02
00:00:00-7');
date_trunc
------------------------
2006-01-02 00:00:00-08
(1 row)

#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: Nicholas Vinen (#1)
Re: BUG #1649: Date calculation year off-by-one error

"Nicholas Vinen" <hb@x256.com> writes:

This is definitely not right:

rt3=# SELECT date_trunc('week', timestamp with time zone '2005-01-02
00:00:00-7');
date_trunc
------------------------
2006-01-02 00:00:00-08
(1 row)

Already fixed in 8.0.2.

regards, tom lane