BUG #13691: Postgres reverse timezone system
От | dungdm93@live.com |
---|---|
Тема | BUG #13691: Postgres reverse timezone system |
Дата | |
Msg-id | 20151021034109.3017.131@wrigleys.postgresql.org обсуждение исходный текст |
Ответы |
Re: BUG #13691: Postgres reverse timezone system
|
Список | pgsql-bugs |
The following bug has been logged on the website: Bug reference: 13691 Logged by: Äặng Minh DÅ©ng Email address: dungdm93@live.com PostgreSQL version: 9.4.4 Operating system: Microsoft Windows 7 Description: I'm in Vietnam with timezone ICT (GMT+7). I wanna find the best way to convert datetime between timezone like this: postgres=# SELECT postgres-# now() AS "NOW", postgres-# now() AT TIME ZONE 'ICT' AS "ICT", postgres-# now() AT TIME ZONE '+7:00' AS "+7:00", postgres-# now() AT TIME ZONE 'UTC+7' AS "UTC+7", postgres-# now() AT TIME ZONE 'UTC+7:00' AS "UTC+7:00", postgres-# now() AT TIME ZONE 'GMT+7:00' AS "GMT+7:00"; -[ RECORD 1 ]------------------------ NOW | 2015-10-21 09:55:50.631+07 ICT | 2015-10-21 09:55:50.631 +7:00 | 2015-10-20 19:55:50.631 UTC+7 | 2015-10-20 19:55:50.631 UTC+7:00 | 2015-10-20 19:55:50.631 GMT+7:00 | 2015-10-20 19:55:50.631 As you can see, ICT and GMT+7:00 or +7:00 are identical, Unfortunately, the query results are different. However, when i select: SELECT now() AT TIME ZONE '-7:00' AS "-7:00"; The result is correct. So why Postgres reverse timezone system??? Thanks you.
В списке pgsql-bugs по дате отправления: