Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Y94HS-0006An-S2 for pgsql-bugs@arkaria.postgresql.org; Thu, 08 Jan 2015 04:01:06 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1Y94HS-0004GH-BA for pgsql-bugs@arkaria.postgresql.org; Thu, 08 Jan 2015 04:01:06 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1Y91Cq-0006xw-PK for pgsql-bugs@postgresql.org; Thu, 08 Jan 2015 00:44:08 +0000 Received: from wrigleys.postgresql.org ([204.145.124.246]) by magus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Y91Cm-0007Rw-Ii for pgsql-bugs@postgresql.org; Thu, 08 Jan 2015 00:44:07 +0000 MIME-Version: 1.0 Subject: BUG #12460: Extracting epoch from timestamp string incorrectly assumes "with time zone" To: pgsql-bugs@postgresql.org From: adeconsulting@pacbell.net Date: Thu, 08 Jan 2015 00:44:00 +0000 Message-ID: <20150108004400.11502.38491@wrigleys.postgresql.org> X-Pg-Spam-Score: -1.9 (-) Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit 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: 12460 Logged by: Alan Edel Email address: adeconsulting@pacbell.net PostgreSQL version: 9.3.5 Operating system: FreeBSD 9.3 Description: 8.3.6 queries using "timestamp" and "timestamptz" casting both give the same result: select extract(epoch from cast('2015/01/07 14:00:00' as timestamp)); date_part ------------ 1420668000 (1 row) select extract(epoch from cast('2015/01/07 14:00:00' as timestamptz)); date_part ------------ 1420668000 (1 row) However, 9.3.5 gives different results, the first one appears to be incorrect: select extract(epoch from cast('2015/01/07 14:00:00' as timestamp)); date_part ------------ 1420639200 (1 row) select extract(epoch from cast('2015/01/07 14:00:00' as timestamptz)); date_part ------------ 1420668000 (1 row) -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs