Re: date_part returns wrong day for 1974-04-28

From: Phil Steinke <lintec(at)clarkhall(dot)ca>
To: Thomas Lockhart <lockhart(at)alumni(dot)caltech(dot)edu>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: date_part returns wrong day for 1974-04-28
Date: 2001-04-09 22:30:17
Message-ID: 20010409183017.B5312@clarkhall.ca
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

* 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

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Holger Klawitter 2001-04-10 07:35:24 aliasing table name in update
Previous Message Thomas Lockhart 2001-04-09 20:40:47 Re: date_part returns wrong day for 1974-04-28