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

2011-03-23 Thread Susanne Ebrecht
x27;Tom Lane'; 'Kevin Grittner' Cc: 'pgsql-bugs@postgresql.org' Subject: RE: [BUGS] TO_CHAR(timestamptz,datetimeformat) wrong after DST change I understand now that I must use America/New_York for DST to function. I see in select * from pg_timezone_names ; that 'EDT&

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

2011-03-22 Thread Jonathan Brinkman
ge- From: Robert Haas [mailto:robertmh...@gmail.com] Sent: Monday, March 21, 2011 11:50 AM To: j...@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

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

2011-03-21 Thread Robert Haas
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.  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

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

2011-03-21 Thread Jonathan Brinkman
(1 row) -Original Message- From: Jonathan Brinkman [mailto:j...@blackskytech.com] Sent: Monday, March 21, 2011 9:14 AM To: 'Tom Lane'; 'Kevin Grittner' Cc: 'pgsql-bugs@postgresql.org' Subject: RE: [BUGS] TO_CHAR(timestamptz,datetimeformat) wrong after DST ch

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

2011-03-21 Thread Jonathan Brinkman
mailto:t...@sss.pgh.pa.us] Sent: Friday, March 18, 2011 12:47 PM To: Kevin Grittner Cc: j...@blackskytech.com; pgsql-bugs@postgresql.org Subject: Re: [BUGS] TO_CHAR(timestamptz,datetimeformat) wrong after DST change "Kevin Grittner" writes: > "Jonathan Brinkman" wrote:

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

2011-03-18 Thread Tom Lane
"Kevin Grittner" writes: > "Jonathan Brinkman" wrote: >> I guess EST is not DST-friendly? > EST stands for Eastern *Standard* Time, which is explicitly *not* > under Daylight Saving Time. Right. SET TIMEZONE 'EST' gets you GMT-5 all year round. For background see this bit in src/timezone/data

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

2011-03-18 Thread Kevin Grittner
"Jonathan Brinkman" wrote: > I guess EST is not DST-friendly? EST stands for Eastern *Standard* Time, which is explicitly *not* under Daylight Saving Time. -Kevin -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org

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

2011-03-18 Thread Jonathan Brinkman
ne 'America/New_York'; and retried the select now(), and now it is correct. -Original Message- From: Tom Lane [mailto:t...@sss.pgh.pa.us] Sent: Friday, March 18, 2011 11:42 AM To: j...@blackskytech.com Cc: pgsql-bugs@postgresql.org Subject: Re: [BUGS] TO_CHAR(timestamptz,dat

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

2011-03-18 Thread Tom Lane
"Jonathan Brinkman" writes: > 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 SNIPP

[BUGS] TO_CHAR(timestamptz,datetimeformat) wrong after DST change

2011-03-18 Thread Jonathan Brinkman
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/ hh:mi AM')