Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1ZolDr-0000v6-01 for pgsql-bugs@arkaria.postgresql.org; Wed, 21 Oct 2015 04:41:59 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1ZolDq-00050p-DK for pgsql-bugs@arkaria.postgresql.org; Wed, 21 Oct 2015 04:41:58 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1ZokHv-0005YL-1d for pgsql-bugs@postgresql.org; Wed, 21 Oct 2015 03:42:07 +0000 Received: from wrigleys.postgresql.org ([204.145.124.246]) by magus.postgresql.org with esmtp (Exim 4.84) (envelope-from ) id 1ZokHr-0000zK-9s for pgsql-bugs@postgresql.org; Wed, 21 Oct 2015 03:42:06 +0000 MIME-Version: 1.0 Subject: BUG #13691: Postgres reverse timezone system To: pgsql-bugs@postgresql.org From: dungdm93@live.com Date: Wed, 21 Oct 2015 03:41:09 +0000 Message-ID: <20151021034109.3017.131@wrigleys.postgresql.org> X-Pg-Spam-Score: -1.0 (-) Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="utf-8" List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org 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. -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs