pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: George Weaver <georgew1@mts.net>
Cc: pgsql-sql@postgresql.org
Subject: Re: Strange behavior with timestamptz
Date: Mon, 25 Aug 2003 16:59:39 -0400
Message-ID: <10999.1061845179@sss.pgh.pa.us> (raw)
In-Reply-To: <006801c36b35$524ecac0$4f0da18e@cleartag>
References: <006801c36b35$524ecac0$4f0da18e@cleartag>

"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



view thread (5+ messages)  latest in thread

Message-ID: <10999.1061845179@sss.pgh.pa.us>
Permalink:  ../10999.1061845179@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/10999.1061845179@sss.pgh.pa.us

 · 

reply

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, georgew1@mts.net
  Subject: Re: Strange behavior with timestamptz
  In-Reply-To: <10999.1061845179@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