* Thomas Lockhart was mumbling about..
> You are likely running across a "known feature" in PostgreSQL for
> versions before the almost-here v7.1. I do not know which time zone you
> are running in (need that info!) but in the US Pacific Time Zone
Aha.. I'm in Eastern (Canada), and doing this for any switch from EST to
EDT causes the problem.. e.g. April 1st of this year:
=> select timestamp(date('2001-04-01'));
timestamp
------------------------
2001-03-31 23:00:00-05
(1 row)
This skewed timestamp then gives the wrong day for the date_part. I think
that time switches in EST/EDT are supposed to happen at 2am, not midnight,
to help avoid this kind of thing.
Phil