Received: from sss.pgh.pa.us (sss.pgh.pa.us [216.151.103.158]) by postgresql.org (8.11.3/8.11.1) with ESMTP id f4DFRxA08468 for ; Sun, 13 May 2001 11:27:59 -0400 (EDT) (envelope-from tgl@sss.pgh.pa.us) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.11.3/8.11.3) with ESMTP id f4DFRkR03452; Sun, 13 May 2001 11:27:46 -0400 (EDT) To: "Eric G. Miller" cc: PostgreSQL General Subject: Re: Bug with timestamp !!! In-reply-to: <20010512225651.A17727@calico.local> References: <9dj2rq$1ij$1@news.tht.net> <20010512225651.A17727@calico.local> Comments: In-reply-to "Eric G. Miller" message dated "Sat, 12 May 2001 22:56:51 -0700" Date: Sun, 13 May 2001 11:27:45 -0400 Message-ID: <3449.989767665@sss.pgh.pa.us> From: Tom Lane X-Archive-Number: 200105/584 X-Sequence-Number: 9443 "Eric G. Miller" 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? 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 :-( regards, tom lane