BUG #1757: timestamp 'epoch' is not absolute
От | Steve Bennett |
---|---|
Тема | BUG #1757: timestamp 'epoch' is not absolute |
Дата | |
Msg-id | 20050706213140.B84EBF0B06@svr2.postgresql.org обсуждение исходный текст |
Ответы |
Re: BUG #1757: timestamp 'epoch' is not absolute
|
Список | pgsql-bugs |
The following bug has been logged online: Bug reference: 1757 Logged by: Steve Bennett Email address: S.Bennett@lancaster.ac.uk PostgreSQL version: 8.0.3 Operating system: Linux Description: timestamp 'epoch' is not absolute Details: I'm seeing a rather annoying problem converting timestamps between unix and PostgreSQL. It appears that the timestamp 'epoch' is being interpreted as relative to the local timezone, rather than being an absolute time. e.g. I'm in the UK, and at the moment we're in summer time, which is UTC+1. If I do: select date_part('epoch', timestamp 'epoch'); I get: date_part ----------- -3600 Whereas if I do: select date_part('epoch', timestamp 'epoch' AT TIME ZONE 'UTC'); I get: date_part ----------- 0 Am I misunderstanding what's going on here? Is there any circumstance where 'epoch' should vary according to the timezone that you happen to be in? Thanks in advance Steve.
В списке pgsql-bugs по дате отправления: