[ https://issues.apache.org/jira/browse/HIVE-14305?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16224307#comment-16224307 ]
Rui Li commented on HIVE-14305: ------------------------------- Hi [~rdblue], the {{timestamp with time zone}} type is added via HIVE-14412. But it doesn't change the UDFs mentioned here so I suppose the issue is still valid. As [suggested by Ashutosh|https://issues.apache.org/jira/browse/HIVE-14412?focusedCommentId=15968447&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-15968447], we'll represent {{timestamp}} with {{java.time.LocalDateTime}} instead of {{java.sql.Timestamp}}, which should eventually fix the issue. > 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)