Re: TimestampTZ

From: hubert depesz lubaczewski <depesz(at)depesz(dot)com>
To: Naz Gassiep <naz(at)mira(dot)net>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: TimestampTZ
Date: 2007-08-13 05:15:10
Message-ID: 20070813051510.GA32245@depesz.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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)

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Naz Gassiep 2007-08-13 05:19:17 Persistent connections in PHP
Previous Message Michael Glaesemann 2007-08-13 05:06:06 Re: TimestampTZ