hive-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael Ubell (Created) (JIRA)" <j...@apache.org>
Subject [jira] [Created] (HIVE-2867) Timestamp is defined to be timezoneless but timestamps appear to be processed in the current timezoneql
Date Tue, 13 Mar 2012 02:44:38 GMT
Timestamp is defined to be timezoneless but timestamps appear to be processed in the current
timezoneql
-------------------------------------------------------------------------------------------------------

                 Key: HIVE-2867
                 URL: https://issues.apache.org/jira/browse/HIVE-2867
             Project: Hive
          Issue Type: Bug
          Components: Query Processor
    Affects Versions: 0.8.1
            Reporter: Michael Ubell


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


--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message