Re: Reading timestamp values from Datums gives garbage values - Mailing list pgsql-hackers

From Sushrut Shivaswamy
Subject Re: Reading timestamp values from Datums gives garbage values
Date
Msg-id CAH5mb9-RLuE+wGDqRx-QsLJ8-15Op=Nn-f7dRRTnEHtBmwvX4A@mail.gmail.com
Whole thread Raw
In response to Re: Reading timestamp values from Datums gives garbage values  (Aleksander Alekseev <aleksander@timescale.com>)
List pgsql-hackers
Thank you everyone for your responses.

I was a bit thrown off by the timestamp value the first time I printed it by how small it was.
The revelation that postgres TimestampTz uses an epoch (time zero) of 2000-01-01 helped clarify
that value would indeed be smaller than regular UNIX epoch.

In my case I was trying to convert a diff of two timestamps into epoch seconds which explains why the value
was just 1.5hr. My issue is now resolved.

Thanks again
 - Sushrut

pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: Avoid orphaned objects dependencies, take 3
Next
From: Justin Pryzby
Date:
Subject: Re: ALTER TABLE SET ACCESS METHOD on partitioned tables