From: Tom Lane <tgl@sss.pgh.pa.us>
To: Eric Lemes <eric.lemes@zanthus.com.br>
Cc: pgsql-sql@postgresql.org
Subject: Re: RES: Datetime problem
Date: Mon, 14 Jun 2004 14:47:15 -0400
Message-ID: <5210.1087238835@sss.pgh.pa.us> (raw)
In-Reply-To: <AIEBKHHFIIDLBADEGCPDCEKLCAAA.eric.lemes@zanthus.com.br>
References: <AIEBKHHFIIDLBADEGCPDCEKLCAAA.eric.lemes@zanthus.com.br>
"Eric Lemes" <eric.lemes@zanthus.com.br> writes:
> - PostgreSQL 7.3.2 on i386-redhat-linux GCC 3.2.2
> - Timezone: Brazil (GMT-3, I think).
Ah, and 2004-10-10 is a daylight savings transition day where you live,
right? (Or at least the obsolete timezone file you have thinks so...)
So local midnight on that day doesn't really exist: you go from 11:59:59
standard time to 01:00:00 summer time.
PG 7.3 and before got this boundary condition wrong in some cases, but
I think 7.4 gets it right. The rule we use now is to interpret invalid
or ambiguous times as local standard time (hence, this input means
midnight standard time), which is what to_timestamp is doing. However,
on reverse conversion you'll get the normalized form of the time, which
is 01:00:00 summer time.
I think what is happening in 7.3 is that the input is interpreted as
midnight summer time, which would reverse-convert as 11:00 PM standard
time...
regards, tom lane
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 using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: tgl@sss.pgh.pa.us, eric.lemes@zanthus.com.br
Subject: Re: RES: Datetime problem
In-Reply-To: <5210.1087238835@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