【发布时间】:2012-01-14 00:13:42
【问题描述】:
谁能解释一下这个符号反转,我在这里迷路了......
SELECT EXTRACT(EPOCH FROM '01-01-1970 00:00:00 UTC+01'::timestamp with time zone)
=> 3600
SELECT EXTRACT(EPOCH FROM '1970-01-01 00:00:00+01'::timestamp with time zone)
=> -3600
Postgres 8.3.14
【问题讨论】:
-
SELECT EXTRACT(EPOCH FROM '1970-01-01 00:00:00 PST+01'::timestamp with time zone) 也是 3600 SELECT EXTRACT(EPOCH FROM '1970-01-01 00 :00:00 LOL+01'::timestamp with time zone) 也是 3600 我猜 postgres 有一种奇怪的方式来判断日期格式无效...
标签: postgresql timezone