Details
-
Bug
-
Status: Resolved
-
Minor
-
Resolution: Duplicate
-
Impala 2.3.0
-
None
Description
Running timestamp queries, I ran into the following bug where PDT and PST convert times to the same value:
Query: select unix_timestamp(to_utc_timestamp('2015-10-13 09:15:34.101', 'PST')) +--------------------------------------------------------------------+ | unix_timestamp(to_utc_timestamp('2015-10-13 09:15:34.101', 'pst')) | +--------------------------------------------------------------------+ | 1444752934 | +--------------------------------------------------------------------+ Query: select unix_timestamp(to_utc_timestamp('2015-10-13 09:15:34.101', 'PDT')) +--------------------------------------------------------------------+ | unix_timestamp(to_utc_timestamp('2015-10-13 09:15:34.101', 'pdt')) | +--------------------------------------------------------------------+ | 1444752934 | +--------------------------------------------------------------------+
PDT should be -07:00 and PST should be -08:00. I think what is happening is that Impala is using daylight-savings transition rules to turn the offset for PST to PDT. This doesn't account for areas that use PST but don't transition to PDT (evidently Metlakatla, Alaska doesn't). My understanding is that the right thing is for location-based zones, like America/Los_Angeles, to transition based on DST rules, but for three-letter zones to be aliases for specific offsets.
Attachments
Issue Links
- relates to
-
IMPALA-2546 Invalid time zones are ignored but should be rejected
- Resolved
-
IMPALA-5563 Timezone lookup may be ambiguous
- Closed