在postgres中反转到“at time zone”

时间:2013-10-07 17:27:59

标签: sql postgresql timezone timezone-offset

我需要将时间戳转换为'Europe / Zurich'时区并自动获取utc_offset,因为它取决于夏令时(GMT + 1或GMT + 2)

例如:9:00:00(无时区的时间戳)变为11:00:00('Europe / Zurich')

at time zone 'Europe/Zurich'
然而,

给了我07:00:00

我可以使用表pg_timezone_names进行连接并设置

time_stamp + utc_offset 

但可能会有更快/更优化的解决方案。类似'时区'......

非常感谢!!

0 个答案:

没有答案
相关问题