hive-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rui Li (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HIVE-14305) To/From UTC timestamp may return incorrect result because of DST
Date Mon, 25 Jul 2016 05:13:20 GMT

    [ https://issues.apache.org/jira/browse/HIVE-14305?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15391358#comment-15391358
] 

Rui Li commented on HIVE-14305:
-------------------------------

bq. This should never be changed once it is set to UTC.
Just to clarify, you mean we should use UTC as default timezone throughout the JVM lifecycle
right? By JVM, I mean Hive Cli, MR/Spark/Tez containers, and probably HS2 and Metastore.
bq. But, to implement the SQL session time zone's default you would need to know what the
original zone was.
Does this mean we need to switch between timezones at some point? If so, any suggestions how
we should make Timezone.setDefault thread safe?
bq. There's the SQL session time zone, are you talking about that?
Yeah, I mean the whole session should use UTC as default timezone.

> To/From UTC timestamp may return incorrect result because of DST
> ----------------------------------------------------------------
>
>                 Key: HIVE-14305
>                 URL: https://issues.apache.org/jira/browse/HIVE-14305
>             Project: Hive
>          Issue Type: Sub-task
>            Reporter: Rui Li
>            Assignee: Rui Li
>
> If the machine's local timezone involves DST, the UDFs return incorrect results.
> For example:
> {code}
> select to_utc_timestamp('2005-04-03 02:01:00','UTC');
> {code}
> returns {{2005-04-03 03:01:00}}. Correct result should be {{2005-04-03 02:01:00}}.
> {code}
> select to_utc_timestamp('2005-04-03 10:01:00','Asia/Shanghai');
> {code}
> returns {{2005-04-03 03:01:00}}. Correct result should be {{2005-04-03 02:01:00}}.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message