BUG #13691: Postgres reverse timezone system - Mailing list pgsql-bugs

From dungdm93@live.com
Subject BUG #13691: Postgres reverse timezone system
Date
Msg-id 20151021034109.3017.131@wrigleys.postgresql.org
Whole thread Raw
Responses Re: BUG #13691: Postgres reverse timezone system  (Tom Lane <tgl@sss.pgh.pa.us>)
List 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 by date:

Previous
From: kang joni
Date:
Subject: Re: BUG #13689: Build failed pg9.4.5 with mingw5.1
Next
From: Tom Lane
Date:
Subject: Re: BUG #13691: Postgres reverse timezone system