I searched a lot on Internet but couldn\'t find the answer. Here is my question:
I\'m writing some queries in Hive. I have a UTC timestamp and would like to change i
Hey just wanted to add a little here, I'd suggest trying to "automate" the system timezone. So instead of statically
#STATIC TZ deceleration
to_utc_timestamp(from_unixtime(1389802875),'America/Montreal')
Give this a shot
#DYNAMIC TZ
select to_utc_timestamp(from_unixtime(1389802875), from_unixtime(unix_timestamp(), "z"));
This just uses the string output format of "from_unixtime
" to return the timezone string (lowercase z)