I'm trying to convert a string with a specific timezone (not UTC) to an unix timestamp.
Conversion from strings in UTC works pretty well with unix_timestamp
function:
hive> select unix_timestamp("2018-12-31 23:59:59 UTC", "yyyy-MM-dd HH:mm:ss z") as unixtime;
unixtime
1546300799
However, when I simply change the timezone (to another valid TZ name) it doesn't work:
hive> select unix_timestamp("2018-12-31 23:59:59 America/Sao_Paulo", "yyyy-MM-dd HH:mm:ss z") as unixtime;
unixtime
NULL
Any suggestions?