Uploaded image for project: 'Hive'
  1. Hive
  2. HIVE-18974

Wrong UTC time while converting from CST by to_utc_timestamp UDFs

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Open
    • Priority: Critical
    • Resolution: Unresolved
    • Affects Version/s: 1.2.1
    • Fix Version/s: None
    • Component/s: CLI
    • Labels:
      None

      Description

      Error on Daylight Saving 2017

       

      select to_utc_timestamp("2017-03-11 19:00:00",'CST');
      OK
      2017-03-12 01:00:00 --> expected 6 hr difference
      Time taken: 0.08 seconds, Fetched: 1 row(s)
      hive> select to_utc_timestamp("2017-03-11 20:00:00",'CST');
      OK
      2017-03-12 03:00:00 --> wrong 7 hr difference
      Time taken: 0.088 seconds, Fetched: 1 row(s)
      hive> select to_utc_timestamp("2017-03-11 21:00:00",'CST');
      OK
      2017-03-12 04:00:00--> wrong 7 hr difference
      Time taken: 2.884 seconds, Fetched: 1 row(s)
      hive> select to_utc_timestamp("2017-03-11 22:00:00",'CST');
      OK
      2017-03-12 05:00:00--> wrong 7 hr difference
      Time taken: 0.075 seconds, Fetched: 1 row(s)
      hive> select to_utc_timestamp("2017-03-11 23:00:00",'CST');
      OK
      2017-03-12 06:00:00 --> wrong 7 hr difference
      Time taken: 0.068 seconds, Fetched: 1 row(s)
      hive> select to_utc_timestamp("2017-03-12 00:00:00",'CST');
      OK
      2017-03-12 07:00:00 --> wrong 7 hr difference
      Time taken: 4.769 seconds, Fetched: 1 row(s)
      hive> select to_utc_timestamp("2017-03-12 01:00:00",'CST');
      OK
      2017-03-12 08:00:00 --> wrong 7 hr difference
      Time taken: 0.066 seconds, Fetched: 1 row(s)
      hive> select to_utc_timestamp("2017-03-12 02:00:00",'CST');
      OK
      2017-03-12 08:00:00 --> wrong 7 hr difference
      Time taken: 0.066 seconds, Fetched: 1 row(s)
      hive> select to_utc_timestamp("2017-03-12 03:00:00",'CST');
      OK
      2017-03-12 08:00:00 --> expected 5 hr
      Time taken: 0.061 seconds, Fetched: 1 row(s)
      hive> select to_utc_timestamp("2017-03-12 04:00:00",'CST');
      OK
      2017-03-12 09:00:00--> expected 5 hr
      Time taken: 0.065 seconds, Fetched: 1 row(s)

        Attachments

          Activity

            People

            • Assignee:
              hiveqa Hive QA
              Reporter:
              swayam swayam
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Due:
                Created:
                Updated: