Re: do I correctly understand these date/time data types?

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Chapman Flack <chap(at)anastigmatix(dot)net>
Cc: PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: do I correctly understand these date/time data types?
Date: 2018-06-24 23:38:14
Message-ID: 20180624233814.GA3020@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sun, Jun 24, 2018 at 05:13:38PM -0400, Chapman Flack wrote:
> Checking my understanding as in $subject:
>
> A TIMESTAMP WITH TIME ZONE has had its specified time zone used at the point
> of entry to convert it to Z time, and then discarded. If I have to map one
> of these to a date/time-with-time-zone datatype in another language, I may
> as well unconditionally map it to the indicated date/time values and
> explicit time zone Z, because there is no information available to
> reconstruct what the original explicit time zone was.

You might want to read my blog about this:

https://momjian.us/main/blogs/pgblog/2017.html#September_27_2017

> A TIME WITH TIME ZONE actually carries its original explicit time zone
> with it, but only in the form of an offset, no named time zone or DST
> indication. I can map one of those faithfully if the other language has
> a time-with-zone-in-offset-form data type.
>
> Speaking of time zones, what PLs out there have a notion of time zone
> maintained by their language runtimes, and how many of those use the
> PostgreSQL session_timezone to initialize that?

That's a good question.

--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://enterprisedb.com

+ As you are, so once was I. As I am, so you will be. +
+ Ancient Roman grave inscription +

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tomas Vondra 2018-06-25 00:14:20 Re: WIP: BRIN multi-range indexes
Previous Message Tomas Vondra 2018-06-24 22:31:00 Re: WIP: BRIN multi-range indexes