Re: PGparam timestamp question

From: Robert Treat <xzilla(at)users(dot)sourceforge(dot)net>
To: Andrew Chernow <ac(at)esilo(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org, Merlin Moncure <mmoncure(at)gmail(dot)com>
Subject: Re: PGparam timestamp question
Date: 2007-12-09 17:26:23
Message-ID: 200712091226.23526.xzilla@users.sourceforge.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2007-12-09 18:26:50 Re: PGparam timestamp question
Previous Message Joshua D. Drake 2007-12-09 17:24:01 Re: whats the deal with -u ?

Browse pgsql-patches by date

  From Date Subject
Next Message Tom Lane 2007-12-09 18:26:50 Re: PGparam timestamp question
Previous Message Andrew Chernow 2007-12-09 16:54:25 Re: PGparam timestamp question