Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id 68E391337BB4 for ; Tue, 22 Mar 2011 09:56:59 -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 37114-07 for ; Tue, 22 Mar 2011 12:56:51 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from nm5.bullet.mail.ne1.yahoo.com (nm5.bullet.mail.ne1.yahoo.com [98.138.90.68]) by mail.postgresql.org (Postfix) with SMTP id 60B731336FA7 for ; Tue, 22 Mar 2011 09:56:51 -0300 (ADT) Received: from [98.138.90.53] by nm5.bullet.mail.ne1.yahoo.com with NNFMP; 22 Mar 2011 12:56:51 -0000 Received: from [98.138.84.41] by tm6.bullet.mail.ne1.yahoo.com with NNFMP; 22 Mar 2011 12:56:51 -0000 Received: from [127.0.0.1] by smtp109.mail.ne1.yahoo.com with NNFMP; 22 Mar 2011 12:56:51 -0000 X-Yahoo-Newman-Id: 62096.29651.bm@smtp109.mail.ne1.yahoo.com Received: from jonathanlaptop (JB@67.34.121.27 with login) by smtp109.mail.ne1.yahoo.com with SMTP; 22 Mar 2011 05:56:49 -0700 PDT X-Yahoo-SMTP: 44.80yyswBBWn2mP4eIs.OiF0CguW7wtDDCwTEpCAZ4GQXK1x4I- X-YMail-OSG: 2Oajq8gVM1kVAvxWfo9P.Zc4EqVB4TfvRty9Z0WNOGq26Vc qePc6eJ3r2VEOUV5CkfHXbOIIKnwQpNdlbLmWLDwbNxTmLbddaSxNHP7wduF ZF8V02mDcPbs_eoWIZ8Ea8h8qIrIdrEZgpUFNK.g3TaJLrYKLIPrecuqx_Yv hJYz3coiLYd3jT1I_BSzISiVarvB62h9PPQAQZCTF7Av4KymaC1m9PMxDGIW x8R7uo.M_pvvPX_IrgakD5HCf.527FWpn52TLPq6e1HB22ZrcTEFXWbYhky4 67yvb9zLvvbbD1Ve5bYJK X-Yahoo-Newman-Property: ymail-3 Reply-To: From: "Jonathan Brinkman" To: "'Robert Haas'" Cc: "'Tom Lane'" , "'Kevin Grittner'" , References: <004c01cbe57c$7d920ca0$78b625e0$@com> <15708.1300462903@sss.pgh.pa.us> <005601cbe585$bc7d4b10$3577e130$@com> <4D834322020000250003BABD@gw.wicourts.gov> <17126.1300466813@sss.pgh.pa.us> <000c01cbe7c9$d7cf2230$876d6690$@com> In-Reply-To: Subject: Re: TO_CHAR(timestamptz,datetimeformat) wrong after DST change Date: Tue, 22 Mar 2011 08:56:47 -0400 Organization: BlackSky Technologies, Inc. Message-ID: <003201cbe890$9c763bc0$d562b340$@com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Mailer: Microsoft Office Outlook 12.0 Thread-Index: Acvn39nrPdgOFmcTRHiM4V1NuqGDSgAr5KVQ 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, RCVD_IN_DNSWL_NONE=-0.0001, UNPARSEABLE_RELAY=0.001 X-Spam-Level: X-Archive-Number: 201103/269 X-Sequence-Number: 29779 Thanks,=20 ALTER ROLE postgres SET time zone 'America/New_York'; Fixed the problem! I applied this to my dev server DB anyways, so maybe this will be fixed = the next time I migrate to Production. ALTER DATABASE beta_cms_main SET time zone 'America/New_York'; -----Original Message----- From: Robert Haas [mailto:robertmhaas@gmail.com]=20 Sent: Monday, March 21, 2011 11:50 AM To: JB@blackskytech.com Cc: Tom Lane; Kevin Grittner; pgsql-bugs@postgresql.org Subject: Re: [BUGS] TO_CHAR(timestamptz,datetimeformat) wrong after DST change On Mon, Mar 21, 2011 at 9:13 AM, Jonathan Brinkman wrote: > I understand now that I must use America/New_York for DST to function. = =A0I > see in select * from pg_timezone_names ; that 'EDT' is a shortcut. I = tried > to SET TIME ZONE 'EDT'; but PG doesn't seem to like that. > > My problem is that the corrected time zone (America/New_York) doesn't = seem > to stick after updating. I update it in psql (cmd line) and within = psql it > returns correctly. But when I then view now() from command line the = DST > change is not there and time zone is again 'EST'. So: SET is a session-local command. You may want to update it in postgresql.conf (and then reload the config using pg_ctl reload). Or you could use ALTER ROLE .. SET or ALTER DATABASE .. SET, if you don't want to change it globally. --=20 Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company