Details
-
Bug
-
Status: Open
-
Major
-
Resolution: Unresolved
-
0.8.1
-
None
-
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