pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Gouse <gkhaji@gmail.com>
Cc: pgsql-bugs@postgresql.org
Subject: Re: to_timestamp returns the incorrect result for the DST fall over time.
Date: Tue, 04 Jan 2011 13:26:50 -0500
Message-ID: <12763.1294165610@sss.pgh.pa.us> (raw)
In-Reply-To: <1294161425291-3327393.post@n5.nabble.com>
References: <1294161425291-3327393.post@n5.nabble.com>

Gouse <gkhaji@gmail.com> writes:
> I find that the to_timestamp giving the incorrect result for the DST time
> period.

On what grounds do you claim it's incorrect?

> select to_timestamp('2010-03-28 01:00:03 243','YYYY-MM-DD HH24:MI:SS.MS')
> results '2010-03-28 02:00:03.243 + 01'  , I am not sure if this is correct.

The reason it does that is that actually there *is* no such local time
as 1:00:03 on that date.  Clocks are supposed to jump from 1AM directly
to 2AM.  PG's actual behavior is that the bogus time is interpreted as
standard time (UTC+0 in your case).  The only other thing it could
plausibly do is throw an error, and that has been judged to be less
useful.

			regards, tom lane



view thread (7+ messages)  latest in thread

Message-ID: <12763.1294165610@sss.pgh.pa.us>
Permalink:  ../12763.1294165610@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/12763.1294165610@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: tgl@sss.pgh.pa.us, gkhaji@gmail.com
  Subject: Re: to_timestamp returns the incorrect result for the DST fall over time.
  In-Reply-To: <12763.1294165610@sss.pgh.pa.us>
  References: <1294161425291-3327393.post@n5.nabble.com> <12763.1294165610@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox