From: Eric G. Miller <egm2@jps.net>
To: PostgreSQL General <pgsql-general@postgresql.org>
Subject: Re: Bug with timestamp !!!
Date: Sun, 13 May 2001 16:49:29 -0700
Message-ID: <20010513164929.A307@calico.local> (raw)
In-Reply-To: <3449.989767665@sss.pgh.pa.us>
References: <9dj2rq$1ij$1@news.tht.net>
<20010512225651.A17727@calico.local>
<3449.989767665@sss.pgh.pa.us>
On Sun, May 13, 2001 at 11:27:45AM -0400, Tom Lane wrote:
> "Eric G. Miller" <egm2@jps.net> writes:
> > While I don't see such dramatic results with this bad input data, I did
> > run across something a little peculiar:
>
> With what PG version? On what platform?
# select version();
version
---------------------------------------------------------------
PostgreSQL 7.1.1 on i686-pc-linux-gnu, compiled by GCC 2.95.4
Debian GNU/Linux, "unstable"
GNU libc6 2.2.3-1
> Comparing 7.1.1 against 7.0.*, I note that the resolution of "illegal"
> times during a DST jump has changed, at least on my platform (HPUX 10.20).
> 7.0.* resolves the time backwards whereas current sources resolve
> forwards: "select timestamp('2001-04-01 02:02:02')" yields
> 2001-04-01 01:02:02-05 in 7.0.2
> 2001-04-01 03:02:02-04 in current
> Since this is dependent on how the local mktime() library routine
> reacts to "illegal" times, some platform-to-platform variation is to be
> expected. Your example looks like mktime() must actually have some
> internal state on your machine, causing its result to depend on what
> it was asked previously :-(
Yes, I think the timezone environment variable is being carried. I wrote
a small test program, and the same weirdness happens. So, it's not
specifically a PostgreSQL issue.
--
Eric G. Miller <egm2@jps.net>
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-admin@postgresql.org
Cc: egm2@jps.net, pgsql-general@postgresql.org
Subject: Re: Bug with timestamp !!!
In-Reply-To: <20010513164929.A307@calico.local>
References: <9dj2rq$1ij$1@news.tht.net> <20010512225651.A17727@calico.local> <3449.989767665@sss.pgh.pa.us> <20010513164929.A307@calico.local>
* 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