You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@linkis.apache.org by king hao <ki...@gmail.com> on 2023/03/02 13:34:14 UTC

[DISCUSS]hive from_unixtime format problem

Joyven

Have you ever encountered the problem that hive's from_unixtime formatting
timestamp is one day shorter than the actual timestamp?




from_unixtime(cast(decisiondate/1000 as bigint), 'yyyy-MM-dd') as
decisiondate




Fly

Check to see if the operating system time zone is correct




Joyven

Found. Operating system time zone problem. 8 hours missing





thank you




Joyven

大数据的大佬,有遇到过hive的from_unixtime格式化时间戳的时候,比实际少一天的问题吗?




from_unixtime(cast(decisiondate/1000 as bigint), 'yyyy-MM-dd') as
decisiondate




Fly

你看下操作系统时区对不对




Joyven

已找到,操作系统时区问题,少了8小时




谢谢