Re: TO_CHAR(timestamptz,datetimeformat) wrong after DST change

Поиск
Список
Период
Сортировка
От Jonathan Brinkman
Тема Re: TO_CHAR(timestamptz,datetimeformat) wrong after DST change
Дата
Msg-id 003201cbe890$9c763bc0$d562b340$@com
обсуждение исходный текст
Ответ на Re: TO_CHAR(timestamptz,datetimeformat) wrong after DST change  (Robert Haas <robertmhaas@gmail.com>)
Список pgsql-bugs
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 <JB@blackskytech.com>
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

В списке pgsql-bugs по дате отправления:

Предыдущее
От: "Adriaan"
Дата:
Сообщение: BUG #5940: Creating a foreign key on an empty table locks table
Следующее
От: Dave Page
Дата:
Сообщение: Re: BUG #5938: PostgreSQL Installer outputs log file with superuser password in clear text