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

Timestamp is defined to be timezoneless but timestamps appear to be processed in the current timezoneql

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 0.8.1
    • None
    • Query Processor
    • None

    Description

      Hive-2272 says:
      Timestamps are interpreted to be timezoneless and stored as an offset from the UNIX epoch. Convenience UDFs for conversion to and from timezones are provided (to_utc_timestamp, from_utc_timestamp).
      The following shows that the timezone is used. The epic should display as 1970-01-01 00:00:00.

      hive> select cast(0 as timestamp) from alltypes limit 1;

      OK
      1969-12-31 16:00:00

      hive> select to_utc_timestamp(cast(0 as timestamp), 'PST') from alltypes limit 1;

      OK
      1970-01-01 00:00:00

      hive> select unix_timestamp(cast("1970-01-01 00:00:00" as timestamp)) from alltypes limit 1;

      OK
      28800

      Attachments

        Activity

          People

            Unassigned Unassigned
            ubell Michael Ubell
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated: