X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [64.117.224.130]) by svr1.postgresql.org (Postfix) with ESMTP id EE3CFD1B89D for ; Mon, 25 Aug 2003 18:03:59 -0300 (ADT) Received: from svr1.postgresql.org ([64.117.224.193]) by localhost (neptune.hub.org [64.117.224.130]) (amavisd-new, port 10024) with ESMTP id 37144-06 for ; Mon, 25 Aug 2003 18:03:28 -0300 (ADT) Received: from sss.pgh.pa.us (unknown [192.204.191.242]) by svr1.postgresql.org (Postfix) with ESMTP id A7D2CD1B550 for ; Mon, 25 Aug 2003 18:03:25 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.12.9/8.12.9) with ESMTP id h7PKxd5H011000; Mon, 25 Aug 2003 16:59:39 -0400 (EDT) To: "George Weaver" Cc: pgsql-sql@postgresql.org Subject: Re: Strange behavior with timestamptz In-reply-to: <006801c36b35$524ecac0$4f0da18e@cleartag> References: <006801c36b35$524ecac0$4f0da18e@cleartag> Comments: In-reply-to "George Weaver" message dated "Mon, 25 Aug 2003 13:18:03 -0500" Date: Mon, 25 Aug 2003 16:59:39 -0400 Message-ID: <10999.1061845179@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200308/301 X-Sequence-Number: 14917 "George Weaver" writes: > Does anyone have any idea why the default for seedlot recorded the time wit= > h the day and month switched, resulting in the seedlot record being stamped= > Nov 8, 2003 while the transaction was stamped correctly as Aug 11, 2003? It's really not possible to believe that both of those were loaded from the defaults you show. now() doesn't ever break down the system clock value into day/month/year --- it just takes the system clock time in seconds-since-epoch and adds a constant to get the right zero offset. So there's no credible mechanism for now() to make such a mistake. I think that your client software supplied a value for one field and didn't supply a value for the other, and the supplied value was provided in the wrong DateStyle. regards, tom lane