[
https://issues.apache.org/jira/browse/HIVE-12706?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16119451#comment-16119451
]
Leela Krishna commented on HIVE-12706:
--------------------------------------
There is still a bug in this - from_utc_timestamp() is interpreting a GMT
timestamp with DST.
HS2 on PST timezone:
GMT timestamp PST timestamp PST 2GMT
2012-03-11 01:30:15.332 2012-03-10 17:30:15.332 2012-03-11 01:30:15.332
2012-03-11 02:30:15.332 2012-03-10 19:30:15.332 2012-03-11 03:30:15.332 (<---
We got 1 hour more on GMT)
PSTtimestap is generated using from_utc_timestamp('2012-03-11 02:30:15.332',
'PST')
PST2GMT timestamp is generated using
to_utc_timestamp(from_utc_timestamp('2012-03-11 02:30:15.332', 'PST'), 'PST')
> Incorrect output from from_utc_timestamp()/to_utc_timestamp when local
> timezone has DST
> ---------------------------------------------------------------------------------------
>
> Key: HIVE-12706
> URL: https://issues.apache.org/jira/browse/HIVE-12706
> Project: Hive
> Issue Type: Bug
> Components: UDF
> Reporter: Jason Dere
> Assignee: Jason Dere
> Fix For: 2.0.0
>
> Attachments: HIVE-12706.1.patch
>
>
> Getting wrong output with the local timezone set to PST (which has DST). I
> don't think this happens when the local timezone does not observe DST.
> {noformat}
> select from_utc_timestamp('2015-03-28 17:00:00', 'Europe/London')
> 2015-03-28 17:00:00
> select from_utc_timestamp('2015-03-28 18:00:00', 'Europe/London')
> 2015-03-28 19:00:00 <= Wrong, should be 2015-03-28 18:00:00
> select from_utc_timestamp('2015-03-28 19:00:00', 'Europe/London')
> 2015-03-28 20:00:00 <= Wrong, should be 2015-03-28 19:00:00
> {noformat}
> Also to_utc_timestamp():
> {noformat}
> select to_utc_timestamp('2015-03-28 17:00:00', 'Europe/London')
> 2015-03-28 17:00:00
> select to_utc_timestamp('2015-03-28 18:00:00', 'Europe/London')
> 2015-03-28 17:00:00 <= Wrong
> select to_utc_timestamp('2015-03-28 19:00:00', 'Europe/London')
> 2015-03-28 18:00:00 <= Wrong
> select to_utc_timestamp('2015-03-28 20:00:00', 'Europe/London')
> 2015-03-28 19:00:00 <= Wrong
> {noformat}
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)