Re: BUG #4757: to_timestamp returns incorrect result

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Timofey(dot)Asyrkin" <timoha-tim(at)ngs(dot)ru>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #4757: to_timestamp returns incorrect result
Date: 2009-04-11 21:31:18
Message-ID: 8009.1239485478@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

"Timofey.Asyrkin" <timoha-tim(at)ngs(dot)ru> writes:
> I'm living in Italy and I have a timezone GMT+2 (summer).
> These two queries return the same result:

> 1)select TO_TIMESTAMP( '25/03/2001 02:00:00', 'dd/mm/yyyy hh24:mi:ss' );
> 2)select TO_TIMESTAMP( '25/03/2001 03:00:00', 'dd/mm/yyyy hh24:mi:ss' );

> Result: 2001-03-25 03:00:00+02

If that day is a DST transition day, those results are not wrong.
The two times are the same, and it happens that we preferentially
show that time in DST.

regards, tom lane

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Bruce Momjian 2009-04-11 21:42:00 Re: libpq 8.4 beta1: $PGHOST complains about missing root.crt
Previous Message Bruce Momjian 2009-04-11 20:14:40 Re: libpq 8.4 beta1: $PGHOST complains about missing root.crt