Re: Timestamp Shifts when calling to_timestamp(extract (epoch from timestamp))

From: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
To: Robert Burgholzer <rburghol(at)vt(dot)edu>
Cc: "pgsql-admin(at)postgresql(dot)org" <pgsql-admin(at)postgresql(dot)org>
Subject: Re: Timestamp Shifts when calling to_timestamp(extract (epoch from timestamp))
Date: 2015-05-12 17:44:26
Message-ID: CAKFQuwZhZqTHCSm7GEXiX4p2s96tBJV_+=X7E0ZoyPywNrZyBg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

On Tue, May 12, 2015 at 10:33 AM, Robert Burgholzer <rburghol(at)vt(dot)edu> wrote:

> Thoughts on this? To me, it would seem intuitive that if you did not
> specify a timezone, the db would choose it's own local timestamp as the
> timezone.
>
>
​The timezone info is truncated.​

​From the documentation:​

​"​
In a literal that has been determined to be timestamp without time zone,
PostgreSQL will silently ignore any time zone indication. That is, the
resulting value is derived from the date/time fields in the input value,
and is not adjusted for time zone.​
​"​

http://www.postgresql.org/docs/9.3/static/datatype-datetime.html

8.5.1.3 Time Stamps

Especially after the examples.

David J.

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Scott Ribe 2015-05-12 17:53:23 Re: Timestamp Shifts when calling to_timestamp(extract (epoch from timestamp))
Previous Message Robert Burgholzer 2015-05-12 17:33:53 Timestamp Shifts when calling to_timestamp(extract (epoch from timestamp))