Re: Strange behavior with timestamptz - Mailing list pgsql-sql

From Tom Lane
Subject Re: Strange behavior with timestamptz
Date
Msg-id 10999.1061845179@sss.pgh.pa.us
Whole thread Raw
In response to Strange behavior with timestamptz  ("George Weaver" <georgew1@mts.net>)
List pgsql-sql
"George Weaver" <georgew1@mts.net> 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


pgsql-sql by date:

Previous
From: "George Weaver"
Date:
Subject: Re: Strange behavior with timestamptz
Next
From: BenLaKnet
Date:
Subject: Re: [ZODB-Dev] What are the ZopeDB limit?