Hi everybody,

I have got some questions concerning from_utc_timestamp date function by using 
hive:


1.    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.

2.    After implementing the CET-workaround described in the first point I get 
correct results for the unix timestamp. However on 28th 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.

"hive -version" prints out: "Hive 1.2.1000.2.6.1.0-129"

Can you give me a feedback to the two points?

Thank you very much!

With kind regards

Jens Klöker
____________________________________________________________________________

ANDREAS STIHL AG & Co. KG
Kommanditgesellschaft mit Sitz in Waiblingen, HRA 260269, Amtsgericht Stuttgart 
Persönlich haftende Gesellschafter: Hans Peter Stihl und STIHL 
Aktiengesellschaft
mit Sitz in Waiblingen, HRB 263722, Amtsgericht Stuttgart
Vorstand der STIHL AG: Dr. Bertram Kandziora (Vorstandsvorsitzender), 
Karl Angler, Norbert Pick, Dr. Michael Prochaska, Wolfgang Zahn
Vorsitzender des Aufsichtsrats der STIHL AG: Dr. Nikolas Stihl
____________________________________________________________________________


Wenn Sie nicht der rechtmäßige Empfänger sind, senden Sie uns bitte die E-Mail 
zurück
und löschen Sie sie auf Ihrem System. Die unberechtigte Nutzung oder Weitergabe 
von
vertraulichen Informationen kann strafrechtlich und zivilrechtlich verfolgt 
werden.


If you are not the legitimate recipient, please send the e-mail back and delete 
it
on your system. Any unauthorized use or transfer of confidential information
may have legal consequences.

Reply via email to