Local Time Convert To UTC Time In Hive

前端 未结 5 539
忘掉有多难
忘掉有多难 2020-12-28 20:34

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

5条回答
  •  抹茶落季
    2020-12-28 21:02

    I went to currentmillis.com and pasted 1349049600 without realizing it was actually seconds. And indeed it returned 1970-01-16 in the date, which means that the function you suggested: from_utc_timestamp actually takes milliseconds as the first parameter? Maybe you can try again with from_utc_timestamp(1349049600000, "GMT") ?

提交回复
热议问题