Details
-
Bug
-
Status: Resolved
-
Minor
-
Resolution: Fixed
-
impala 2.5.1
-
None
Description
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:
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 | +--------------------------------------------------+
Hive:
select from_utc_timestamp('2016-10-30 00:30:00','CET'); INFO : OK +------------------------+--+ | _c0 | +------------------------+--+ | 2016-10-30 01:30:00.0 | +------------------------+--+
MySQL:
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 | +---------------------------------------------------+
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:
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
Hive:
+------------------------+--+ | _c0 | +------------------------+--+ | 2016-10-30 02:30:00.0 | +------------------------+--+ 1 row selected (0.252 seconds)
MySQL:
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)
Seems like a bug.
Attachments
Issue Links
- is related to
-
IMPALA-2546 Invalid time zones are ignored but should be rejected
- Resolved