【发布时间】:2021-04-24 22:16:44
【问题描述】:
我正在使用下面的 postgres sql 将 unix 纪元时间转换为时间戳。
select to_timestamp(1608816600) at time zone 'UTC';
epoch 时间不包含毫秒时有效,但包含毫秒时无效。以下查询:
select to_timestamp(1611150788148) at time zone 'UTC';
返回:
但它应该是 Wed Jan 20 2021 13:53:08 几毫秒。来源:https://currentmillis.com/
【问题讨论】:
标签: postgresql