Presto:发布 table 时区更改为正确的时区

Presto: Publish a table with timezone altered to the correct zone

我正在尝试更改 presto 中时间戳的时区,但是,当我将列类型转换回时间戳时,时区校正被还原。我需要将其转换为 timestamp/bigint/string 才能将数据存储在模式中,因为模式不存储列类型时间戳时区。我试过了

SELECT FROM_UNIXTIME(CAST(to_unixtime(CAST('2012-10-31 01:00' AS timestamp) AT TIME ZONE 'US/Pacific') * 1000 AS bigint)/1000);

PostgreSQL => ALTER TABLE without timezone -> with timezone, using select for TZ

Alter timezone constraint PostgreSQL

How do I convert a string which is actually a date with timezone to a timestamp in Presto?

但是一直没能解决问题。有没有一种方法可以将时区附加日期列存储在 table 中而不将其还原?

谢谢!

SELECT CAST(SUBSTR(CAST((FROM_UNIXTIME(CAST(1578514469000 AS BIGINT)/1000) AT TIME ZONE 'US/Pacific') AS varchar), 1, 23) AS时间戳)