From: Jonathan Brinkman <JB@BlackSkyTech.com>
To: 'Robert Haas' <robertmhaas@gmail.com>
Cc: 'Tom Lane' <tgl@sss.pgh.pa.us>
Cc: 'Kevin Grittner' <Kevin.Grittner@wicourts.gov>
Cc: pgsql-bugs@postgresql.org
Subject: Re: TO_CHAR(timestamptz,datetimeformat) wrong after DST change
Date: Tue, 22 Mar 2011 08:56:47 -0400
Message-ID: <003201cbe890$9c763bc0$d562b340$@com> (raw)
In-Reply-To: <AANLkTi=ab67C4rC4E0NUHwhvt_KPetqDti7YSHP4_OvU@mail.gmail.com>
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>
<AANLkTi=ab67C4rC4E0NUHwhvt_KPetqDti7YSHP4_OvU@mail.gmail.com>
Thanks,
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]
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 <JB@blackskytech.com>
wrote:
> I understand now that I must use America/New_York for DST to function. I
> 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.
--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-bugs@postgresql.org
Cc: JB@BlackSkyTech.com, robertmhaas@gmail.com, tgl@sss.pgh.pa.us, Kevin.Grittner@wicourts.gov
Subject: Re: TO_CHAR(timestamptz,datetimeformat) wrong after DST change
In-Reply-To: <003201cbe890$9c763bc0$d562b340$@com>
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> <AANLkTi=ab67C4rC4E0NUHwhvt_KPetqDti7YSHP4_OvU@mail.gmail.com> <003201cbe890$9c763bc0$d562b340$@com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox