Uploaded image for project: 'IMPALA'
  1. IMPALA
  2. IMPALA-2542

PDT and PST use the same offset

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Duplicate
    • Impala 2.3.0
    • None
    • Backend

    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

          Activity

            People

              Unassigned Unassigned
              blue_impala_48d6 Ryan Blue
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: