Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id 5EF041337999 for ; Fri, 18 Mar 2011 11:55:28 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.243]) (amavisd-maia, port 10024) with ESMTP id 56761-05 for ; Fri, 18 Mar 2011 14:55:21 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from nm6.bullet.mail.bf1.yahoo.com (nm6.bullet.mail.bf1.yahoo.com [98.139.212.165]) by mail.postgresql.org (Postfix) with SMTP id EA3C6133655C for ; Fri, 18 Mar 2011 11:55:20 -0300 (ADT) Received: from [98.139.212.149] by nm6.bullet.mail.bf1.yahoo.com with NNFMP; 18 Mar 2011 14:55:21 -0000 Received: from [98.139.213.15] by tm6.bullet.mail.bf1.yahoo.com with NNFMP; 18 Mar 2011 14:55:21 -0000 Received: from [127.0.0.1] by smtp115.mail.bf1.yahoo.com with NNFMP; 18 Mar 2011 14:55:21 -0000 X-Yahoo-Newman-Id: 188.19983.bm@smtp115.mail.bf1.yahoo.com Received: from jonathanlaptop (JB@67.34.121.27 with login) by smtp115.mail.bf1.yahoo.com with SMTP; 18 Mar 2011 07:55:18 -0700 PDT X-Yahoo-SMTP: 44.80yyswBBWn2mP4eIs.OiF0CguW7wtDDCwTEpCAZ4GQXK1x4I- X-YMail-OSG: O1ROF7wVM1mErHSqAQs5qxkWabyo2UFE6wJlQ54fP1J34l_ Mwn1_S24Vp84E8ay7vQi1bmlyinQex7fFbyOGYrhOtEZOZUfEbOEutn.3wka hHgTqiKfkCq8hUrFtE9w9YKZxtJzpvT5jCMCGXsg7Nw9dZ3Jk06FhFxy2Z28 Bg8a4TDP.gxXnJxJxJnzX9yMey7EgIcNRO5A3_nd77z0AXUIReWqz34Zxo2u I X-Yahoo-Newman-Property: ymail-3 Reply-To: From: "Jonathan Brinkman" To: Subject: TO_CHAR(timestamptz,datetimeformat) wrong after DST change Date: Fri, 18 Mar 2011 10:55:03 -0400 Organization: BlackSky Technologies, Inc. Message-ID: <004c01cbe57c$7d920ca0$78b625e0$@com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook 12.0 Thread-Index: AcvlfHQBi0qpKCRQQ96sgTmIs0tfcQ== Content-Language: en-us X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.899 tagged_above=-5 required=5 tests=BAYES_00=-1.9, UNPARSEABLE_RELAY=0.001 X-Spam-Level: X-Archive-Number: 201103/246 X-Sequence-Number: 29756 My TO_CHAR function is now an hour off thanks to Daylight Savings Time. The dates are correct (I'm in EST: TZ=-04) but my function now returns TIME an hour early. (prior to DST we were TZ=-05). TIMESTAMPTZ data (v_dt): 2011-03-17 18:21:50-04 FUNCTION SNIPPET: to_char(v_dt, 'mm/dd/yyyy hh:mi AM') FUNCTION RETURNS: 03/18/2011 09:21 AM FUNCTION SHOULD RETURN: 03/18/2011 10:21 AM postgres=# show time zone; TimeZone ------------------ America/New_York (1 row)