result of conversion to timestamp is shifted 1 minute back

Lists: pgsql-bugs
From: pgsql-bugs(at)postgresql(dot)org
To: pgsql-bugs(at)postgresql(dot)org
Subject: result of conversion to timestamp is shifted 1 minute back
Date: 2001-04-11 13:14:22
Message-ID: 200104111314.f3BDEMf38121@hub.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-bugs

Tomas Dobrovolny (tdobrovolny(at)certifis(dot)cz) reports a bug with a severity of 1
The lower the number the more severe it is.

Short Description
result of conversion to timestamp is shifted 1 minute back

Long Description
When postgresql converts string representation of date to timestamp, he make one minute back error. Any insert or update with string date representation damage real value of date!

BUT if you use string date representation without time part, your data will be shifted one day back!!!

Tested on RedHat 7.0, PostgreSQL 7.0.3

Sample Code
select timestamp('2001-12-25 23:59:00+01') ;
gives 2001-12-25 23:58:00+01

select timestamp('2001-12-25 11:10:00+01') ;
gives 2001-12-25 11:09:00+01

select timestamp('2001-12-25') ;
gives 2001-12-24 23:59:00+01

No file was uploaded with this report


From: Thomas Lockhart <lockhart(at)alumni(dot)caltech(dot)edu>
To: tdobrovolny(at)certifis(dot)cz, pgsql-bugs(at)postgresql(dot)org
Subject: Re: result of conversion to timestamp is shifted 1 minute back
Date: 2001-04-11 13:36:17
Message-ID: 3AD45DD1.25939489@alumni.caltech.edu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-bugs

> When postgresql converts string representation of date to timestamp, he make one minute back error. Any insert or update with string date representation damage real value of date!
> BUT if you use string date representation without time part, your data will be shifted one day back!!!
> Tested on RedHat 7.0, PostgreSQL 7.0.3

We will need more details on your installation to be able to help, since
this is *not* reproducible on most systems. We've never heard of this
before!

- Thomas