Re: RES: RES: Dates rejected

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: carlos(dot)reimer(at)opendb(dot)com(dot)br
Cc: "Andreas Kretschmer" <akretschmer(at)spamfence(dot)net>, "Pgsql-General(at)Postgresql(dot)Org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: RES: RES: Dates rejected
Date: 2006-10-16 23:38:08
Message-ID: 7514.1161041888@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

"Carlos H. Reimer" <carlos(dot)reimer(at)opendb(dot)com(dot)br> writes:
> The problem is related with the to_timestamp function that returns +1 hour
> offset only for the date 15/10/2006. The 15th october is the first day of
> our day light change.

The reason is that it's generating '2006-10-15 00:00:00-03' to start
with, but there *is* no such time in your time zone: that was the
instant that the clocks stepped forward, and so it's equally legitimate
to display that time as '2006-10-15 01:00:00-02', which is what in fact
our code happens to do. Then when you coerce the timestamp with time
zone down to plain timestamp, the offset info that might have cued you
what's going on goes away...

I believe the lack of a definite midnight hour is one reason why most
countries prefer to change their clocks at some other time of night.

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2006-10-16 23:47:35 Re: datatype preceded by underscore creates array
Previous Message Tom Lane 2006-10-16 23:16:29 Re: Anyone using "POSIX" time zone offset capability?