Re: PGparam timestamp question - Mailing list pgsql-hackers

From Robert Treat
Subject Re: PGparam timestamp question
Date
Msg-id 200712091226.23526.xzilla@users.sourceforge.net
Whole thread Raw
In response to Re: PGparam timestamp question  (Andrew Chernow <ac@esilo.com>)
List pgsql-hackers
On Sunday 09 December 2007 11:54, Andrew Chernow wrote:
> Okay, thanks.  So using WITHOUT TIME ZONE basically means, store the
> provided value as UTC.  Meaning, 8AM EST NOW() is stored/treated as 8AM
> UTC.
>

Not quite. Using WITHOUT TIME ZONE means to not store any time zone 
information. It appears as UTC only because you selected it out as UTC. 

pagila=# select now(), now() at time zone 'PST' , now()::timestamp at time 
zone 'PST';
-[ RECORD 1 ]---------------------------
now      | 2007-12-09 12:25:19.240661-05
timezone | 2007-12-09 09:25:19.240661
timezone | 2007-12-09 15:25:19.240661-05

-- 
Robert Treat
Build A Brighter LAMP :: Linux Apache {middleware} PostgreSQL


pgsql-hackers by date:

Previous
From: "Joshua D. Drake"
Date:
Subject: Re: whats the deal with -u ?
Next
From: Tom Lane
Date:
Subject: Re: PGparam timestamp question