You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hive.apache.org by "Ryan Blue (JIRA)" <ji...@apache.org> on 2017/10/27 16:27:00 UTC

[jira] [Commented] (HIVE-14305) To/From UTC timestamp may return incorrect result because of DST

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

Ryan Blue commented on HIVE-14305:
----------------------------------

[~lirui], the behavior for those functions is already well established and works fine with the {{timestamp without time zone}} / {{timestamp}} type. I would be interested to hear your thoughts on implementing {{timestamp with time zone}}, but I don't think that we need that type to fix bugs.

> 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
>              Labels: timestamp
>
> 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.4.14#64029)