Re: [BUGS] BUG #5031: DATE_TRUNC returns the wrong value when specifying MONTH

2009-09-03 Thread Mark Douglas
You're correct. When I run this from psql it returns the correct result. When I run it from DBVisualizer, which I normally use, it adjust the result to my local time zone. Thanks for looking into it. Sorry about bugging you with that. Thanks, Mark On 9/2/09 10:24 PM, "Tom Lane" wrote: Mark

Re: [BUGS] BUG #5031: DATE_TRUNC returns the wrong value when specifying MONTH

2009-09-02 Thread Mark Douglas
I have my timezone set to GMT so there really shouldn't be any time zone adjustments. Mark On 9/2/09 10:01 PM, "Tom Lane" wrote: "Mark Douglas" writes: > The following use of DATE_TRUNC returns the wrong value. I called the > function on 2009-09-02. It should return '2009-09-01 00:00:00' for

Re: [BUGS] BUG #5031: DATE_TRUNC returns the wrong value when specifying MONTH

2009-09-02 Thread Tom Lane
Mark Douglas writes: > I have my timezone set to GMT so there really shouldn't be any time zone > adjustments. Okay ... postgres=# set timezone = GMT; SET postgres=# SELECT DATE_TRUNC('MONTH', CURRENT_DATE); date_trunc 2009-09-01 00:00:00+00 (1 row) I su

Re: [BUGS] BUG #5031: DATE_TRUNC returns the wrong value when specifying MONTH

2009-09-02 Thread Tom Lane
"Mark Douglas" writes: > The following use of DATE_TRUNC returns the wrong value. I called the > function on 2009-09-02. It should return '2009-09-01 00:00:00' for the > following usage: > SELECT DATE_TRUNC('MONTH', CURRENT_DATE); > It instead returns '2009-08-31 17:00:00. Really? What timezon

[BUGS] BUG #5031: DATE_TRUNC returns the wrong value when specifying MONTH

2009-09-02 Thread Mark Douglas
The following bug has been logged online: Bug reference: 5031 Logged by: Mark Douglas Email address: m...@steelhousemedia.com PostgreSQL version: 8.4.0 Operating system: Ubunto Linux Description:DATE_TRUNC returns the wrong value when specifying MONTH Details: The f