From: | Marko Tiikkaja <marko(at)joh(dot)to> |
---|---|
To: | tbrandys(at)webcellence(dot)com |
Cc: | Pg Bugs <pgsql-bugs(at)postgresql(dot)org> |
Subject: | Re: BUG #14660: Conversion to UTC not properly computed |
Date: | 2017-05-18 16:24:39 |
Message-ID: | CAL9smLBDC5Kh9oWuGz2N4yq3DH5W5N_thLOLbwPaT3zV4bffQw@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
On Thu, May 18, 2017 at 6:09 PM, <tbrandys(at)webcellence(dot)com> wrote:
> The following bug has been logged on the website:
>
> Bug reference: 14660
> Logged by: Todd Brandys
> Email address: tbrandys(at)webcellence(dot)com
> PostgreSQL version: 9.6.3
> Operating system: Slackware Linux
> Description:
>
> According to
> https://www.postgresql.org/docs/9.6/static/datatype-datetime.html
>
> Conversions between timestamp without time zone and timestamp with time
> zone
> normally assume that the timestamp without time zone value should be taken
> or given as timezone local time. A different time zone can be specified for
> the conversion using AT TIME ZONE.
>
> With this in mind, the following output is troublesome:
>
> vendita=# select now()::timestamp(0), now()::timestamp(0) with time zone,
> timezone('utc', now()::timestamp(0)), timezone('utc', now()::timestamp(0)
> with time zone);
> now | now | timezone |
> timezone
> ---------------------+------------------------+-------------
> -----------+---------------------
> 2017-05-18 08:55:10 | 2017-05-18 08:55:10-07 | 2017-05-18 01:55:10-07 |
> 2017-05-18 15:55:10
> (1 row)
>
> vendita=# show timezone;
> TimeZone
> ------------
> US/Arizona
> (1 row)
>
> The computation where the assumed use of the local time zone should occur
> is
> incorrect (the third column).
Looks fine to me. What should the answer in your opinion be, and why?
.m
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2017-05-18 16:24:47 | Re: BUG #14660: Conversion to UTC not properly computed |
Previous Message | tbrandys | 2017-05-18 16:09:16 | BUG #14660: Conversion to UTC not properly computed |