Jens Klöker created HIVE-21129: ---------------------------------- Summary: from_utc_timestamp date function does not work like it should Key: HIVE-21129 URL: https://issues.apache.org/jira/browse/HIVE-21129 Project: Hive Issue Type: Bug Affects Versions: 1.2.1 Reporter: Jens Klöker
# I have a datetime value which is meant to be in UTC time. By using from_utc_timestamp I want to get the correct unix timestamp out of this date. I would think, that I don't have to define a timezone, and if I have to define a timezone it should be UTC. However to get a correct conversion to unix timestamps I have to define 'CET' as timezone string. This is kind of confusing to me. Additional information: 'CET' is the timezone of the servers, on which hive is running. Maybe in other timezones users currently have to define their timezone, to get a correct unix timestamp. But in my opinion, a definition of a timezone should not be necessary to convert from UTC datetime to UTC unix timestamp. However I fixed it by defining CET. This is the reason, why I'm afraid of a future correction. My timezone string will then probably get incorrect resulting in incorrect unix timestamps in my implementation. # After implementing the CET-workaround described in the first point I get correct results for the unix timestamp. However on 28^th^ of Oct. 2018 some timestamps are not calculated correctly (1 hour difference). On this date there has been a "daylight-saving-time" event in 'CET' timezone. The clock has been set from 03:00:00 to 02:00:00. This is a strong hint, that additional to the issue described first, there is also something wrong when it comes to timezone conversions near such events. I observed this behavior with data between 00:00:00 and 01:00:00. I don't know if this behavior can be observed between 02:00:00 and 24:00:00. -- This message was sent by Atlassian JIRA (v7.6.3#76005)