Home > Archive > PostgreSQL Bugs > May 2005 > BUG #1649: Date calculation year off-by-one error









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

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

2005-05-05, 9:24 am


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)

---------------------------(end of broadcast)---------------------------
TIP 9: the planner will ignore your desire to choose an index scan if your
joining column's datatypes do not match

Tom Lane

2005-05-05, 9:24 am

"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

---------------------------(end of broadcast)---------------------------
TIP 8: explain analyze is your friend

Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2008 droptable.com