[
https://issues.apache.org/jira/browse/HIVE-14305?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15391280#comment-15391280
]
Ryan Blue commented on HIVE-14305:
----------------------------------
To be clear, I'm saying that the correct solution is to call
Timezone.setDefault to set the zone used by Timestamp to UTC. This should never
be changed once it is set to UTC. But, to implement the SQL session time zone's
default you would need to know what the original zone was.
I'm not sure what you mean by "whole query"; I'm not aware of some setting for
just a query. There's the SQL session time zone, are you talking about that?
> 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)