[ https://issues.apache.org/jira/browse/HIVE-14903?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16107383#comment-16107383 ]
Barna Zsombor Klara commented on HIVE-14903: -------------------------------------------- It seems this is already fixed on the master branch: {code} select from_utc_timestamp('2016-10-30 00:30:00','CET'); +------------------------+ | _c0 | +------------------------+ | 2016-10-30 02:30:00.0 | +------------------------+ {code} If that is the case and you can confirm then please resolve the Jira? > from_utc_time function issue for CET daylight savings > ----------------------------------------------------- > > Key: HIVE-14903 > URL: https://issues.apache.org/jira/browse/HIVE-14903 > Project: Hive > Issue Type: Bug > Components: Beeline > Affects Versions: 2.0.1 > Reporter: Eric Lin > Priority: Minor > > Based on https://en.wikipedia.org/wiki/Central_European_Summer_Time, the > summer time is between 1:00 UTC on the last Sunday of March and 1:00 on the > last Sunday of October, see test case below: > Impala: > {code} > select from_utc_timestamp('2016-10-30 00:30:00','CET'); > Query: select from_utc_timestamp('2016-10-30 00:30:00','CET') > +--------------------------------------------------+ > | from_utc_timestamp('2016-10-30 00:30:00', 'cet') | > +--------------------------------------------------+ > | 2016-10-30 01:30:00 | > +--------------------------------------------------+ > {code} > Hive: > {code} > select from_utc_timestamp('2016-10-30 00:30:00','CET'); > INFO : OK > +------------------------+--+ > | _c0 | > +------------------------+--+ > | 2016-10-30 01:30:00.0 | > +------------------------+--+ > {code} > MySQL: > {code} > mysql> SELECT CONVERT_TZ( '2016-10-30 00:30:00', 'UTC', 'CET' ); > +---------------------------------------------------+ > | CONVERT_TZ( '2016-10-30 00:30:00', 'UTC', 'CET' ) | > +---------------------------------------------------+ > | 2016-10-30 02:30:00 | > +---------------------------------------------------+ > {code} > At 00:30AM UTC, the daylight saving has not finished so the time different > should still be 2 hours rather than 1. MySQL returned correct result > At 1:30, results are correct: > Impala: > {code} > Query: select from_utc_timestamp('2016-10-30 01:30:00','CET') > +--------------------------------------------------+ > | from_utc_timestamp('2016-10-30 01:30:00', 'cet') | > +--------------------------------------------------+ > | 2016-10-30 02:30:00 | > +--------------------------------------------------+ > Fetched 1 row(s) in 0.01s > {code} > Hive: > {code} > +------------------------+--+ > | _c0 | > +------------------------+--+ > | 2016-10-30 02:30:00.0 | > +------------------------+--+ > 1 row selected (0.252 seconds) > {code} > MySQL: > {code} > mysql> SELECT CONVERT_TZ( '2016-10-30 01:30:00', 'UTC', 'CET' ); > +---------------------------------------------------+ > | CONVERT_TZ( '2016-10-30 01:30:00', 'UTC', 'CET' ) | > +---------------------------------------------------+ > | 2016-10-30 02:30:00 | > +---------------------------------------------------+ > 1 row in set (0.00 sec) > {code} > Seems like a bug. -- This message was sent by Atlassian JIRA (v6.4.14#64029)