impala-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Matthew Jacobs (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (IMPALA-2542) PDT and PST use the same offset
Date Thu, 22 Jun 2017 20:27:00 GMT

     [ https://issues.apache.org/jira/browse/IMPALA-2542?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Matthew Jacobs resolved IMPALA-2542.
------------------------------------
    Resolution: Duplicate

Closing in favor of the more general JIRA: https://issues.apache.org/jira/browse/IMPALA-5563

> PDT and PST use the same offset
> -------------------------------
>
>                 Key: IMPALA-2542
>                 URL: https://issues.apache.org/jira/browse/IMPALA-2542
>             Project: IMPALA
>          Issue Type: Bug
>          Components: Backend
>    Affects Versions: Impala 2.3.0
>            Reporter: Ryan Blue
>            Priority: Minor
>              Labels: timestamp
>
> Running timestamp queries, I ran into the following bug where PDT and PST convert times
to the same value:
> {code}
> Query: select unix_timestamp(to_utc_timestamp('2015-10-13 09:15:34.101', 'PST'))
> +--------------------------------------------------------------------+
> | unix_timestamp(to_utc_timestamp('2015-10-13 09:15:34.101', 'pst')) |
> +--------------------------------------------------------------------+
> | 1444752934                                                         |
> +--------------------------------------------------------------------+
> Query: select unix_timestamp(to_utc_timestamp('2015-10-13 09:15:34.101', 'PDT'))
> +--------------------------------------------------------------------+
> | unix_timestamp(to_utc_timestamp('2015-10-13 09:15:34.101', 'pdt')) |
> +--------------------------------------------------------------------+
> | 1444752934                                                         |
> +--------------------------------------------------------------------+
> {code}
> [PDT should be -07:00 and PST should be -08:00|https://www.timeanddate.com/time/zones/pst].
I think what is happening is that Impala is using daylight-savings transition rules to turn
the offset for PST to PDT. This doesn't account for areas that use PST but don't transition
to PDT (evidently Metlakatla, Alaska doesn't). My understanding is that the right thing is
for location-based zones, like America/Los_Angeles, to transition based on DST rules, but
for three-letter zones to be aliases for specific offsets.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message