Re: [GENERAL] postgres UTC different from perl?

2007-12-23 Thread Louis-David Mitterrand
On Wed, Dec 19, 2007 at 08:14:17PM -0500, Tom Lane wrote: Richard Huxton [EMAIL PROTECTED] writes: I'm not sure that (CURRENT_DATE AT TIME ZONE 'UTC') does what you think it does. Try setting your timezone to various offsets and exploring. In fact, I think it's adjusting in exactly the

Re: [GENERAL] postgres UTC different from perl?

2007-12-23 Thread Tom Lane
Louis-David Mitterrand [EMAIL PROTECTED] writes: On Wed, Dec 19, 2007 at 08:14:17PM -0500, Tom Lane wrote: Richard Huxton [EMAIL PROTECTED] writes: I'm not sure that (CURRENT_DATE AT TIME ZONE 'UTC') does what you think it does. Try setting your timezone to various offsets and exploring.

[GENERAL] postgres UTC different from perl?

2007-12-19 Thread Louis-David Mitterrand
Hi, when trying: psql template1 -c select date_part('epoch',current_date at time zone 'UTC'); date_part 1198015200 the result is different from perl -MDateTime -le 'print DateTime-today(time_zone = UTC)-epoch;' 1198022400 Is there an issue with postgresql?

Re: [GENERAL] postgres UTC different from perl?

2007-12-19 Thread Richard Huxton
Louis-David Mitterrand wrote: Hi, when trying: psql template1 -c select date_part('epoch',current_date at time zone 'UTC'); date_part 1198015200 the result is different from perl -MDateTime -le 'print DateTime-today(time_zone = UTC)-epoch;' 1198022400 Is there an issue

Re: [GENERAL] postgres UTC different from perl?

2007-12-19 Thread Tom Lane
Richard Huxton [EMAIL PROTECTED] writes: I'm not sure that (CURRENT_DATE AT TIME ZONE 'UTC') does what you think it does. Try setting your timezone to various offsets and exploring. In fact, I think it's adjusting in exactly the wrong direction. I get the right number from regression=#