使用Peewee将Postgresql中的浮点转换为时间戳

使用Peewee将Postgresql中的浮点转换为时间戳,postgresql,orm,peewee,datetime-conversion,Postgresql,Orm,Peewee,Datetime Conversion,在Postgress中,我很难将浮点列值转换为时间戳。实际上,在SQL中是这样的: TIMESTAMP 'epoch' + "t1"."timestamp" * INTERVAL '1 second') at time zone 'UTC' 你能帮我用Peewee ORM表达同样的意思吗?为什么不: SELECT to_timestamp(t1.timestamp); 看起来这会有用的。。。在peewee: SomeModel.select(fn.to_timestamp(SomeModel

在Postgress中,我很难将浮点列值转换为时间戳。实际上,在SQL中是这样的:

TIMESTAMP 'epoch' + "t1"."timestamp" * INTERVAL '1 second') at time zone 'UTC'
你能帮我用Peewee ORM表达同样的意思吗?

为什么不:

SELECT to_timestamp(t1.timestamp);
看起来这会有用的。。。在peewee:

SomeModel.select(fn.to_timestamp(SomeModel.timestamp))