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

From: Scott Ribe <scott_ribe(at)elevated-dev(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 23:58:35
Message-ID: 18E25F6F-7209-43A3-BEAB-8A85D2A47461@elevated-dev.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

On May 12, 2015, at 5:49 PM, Robert Burgholzer <rburghol(at)vt(dot)edu> wrote:
>
> to_timestamp translates into the local TZ Always.

No, it translates to UTC, but timestamps by default display in your local timezone. Look at your example, the result of to_timestamp is midnight UTC as expected, which in your time zone is 19:00.

--
Scott Ribe
scott_ribe(at)elevated-dev(dot)com
http://www.elevated-dev.com/
https://www.linkedin.com/in/scottribe/
(303) 722-0567 voice

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Albe Laurenz 2015-05-13 08:00:49 Re: Timestamp Shifts when calling to_timestamp(extract (epoch from timestamp))
Previous Message Robert Burgholzer 2015-05-12 23:49:47 Timestamp Shifts when calling to_timestamp(extract (epoch from timestamp))