Re: TimestampTZ - Mailing list pgsql-general

From hubert depesz lubaczewski
Subject Re: TimestampTZ
Date
Msg-id 20070813051510.GA32245@depesz.com
Whole thread Raw
In response to TimestampTZ  (Naz Gassiep <naz@mira.net>)
List pgsql-general
On Mon, Aug 13, 2007 at 02:47:06PM +1000, Naz Gassiep wrote:
> When entering data into a timestamptz field, if no timezone is added
> does it assume you've entered a UTC time, or the time at the timezone
> set in the session with SET TIMEZONE, or the local system time ?

i dont understand - why didn't you simply test? instead of writing email
you could simply:
# select now();
              now
-------------------------------
 2007-08-13 07:13:54.363458+02
(1 row)

# select '2007-08-13 07:13:54'::timestamptz;
      timestamptz
------------------------
 2007-08-13 07:13:54+02
(1 row)

and everything is clear - it's local timezone.

depesz

--
quicksil1er: "postgres is excellent, but like any DB it requires a
highly paid DBA.  here's my CV!" :)
http://www.depesz.com/ - blog dla ciebie (i moje CV)

pgsql-general by date:

Previous
From: Michael Glaesemann
Date:
Subject: Re: TimestampTZ
Next
From: Naz Gassiep
Date:
Subject: Persistent connections in PHP