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

Wrong UTC time while converting from CST by to_utc_timestamp UDFs

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Critical
    • Resolution: Unresolved
    • 1.2.1
    • None
    • CLI
    • 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

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

            Dates

              Created:
              Updated: