Search Postgresql Archives

Re: Understanding TIMESTAMP WITH TIME ZONE

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 01/20/2013 04:28 PM, Robert James wrote:
On 1/18/13, Steve Crawford <scrawford@xxxxxxxxxxxxxxxxxxxx> wrote:



I'm confused.  If I make sure to use UTC, isn't timestamp without time
zone identical, then? If not, what is the difference?



Realized my previous explanation could be better. The primary difference is that when you use WITH TIME ZONE Postgres stores the date/time as UTC and knows it has done so. If you use WITHOUT TIME ZONE it does not. For purposes of comparison it then makes the assumption the WITHOUT date/time data is whatever is set for local time. In the situation you describe above you would need to either set local time at UTC or use AT TIME ZONE to make the correction.


--
Adrian Klaver
adrian.klaver@xxxxxxxxx


--
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux