Re: [HACKERS] Re: [GENERAL] leap day bug after 1901

From: Thomas Lockhart <lockhart(at)alumni(dot)caltech(dot)edu>
To: José Soares <jose(at)sferacarta(dot)com>
Cc: hackers <pgsql-hackers(at)postgreSQL(dot)org>, general <pgsql-general(at)postgreSQL(dot)org>
Subject: Re: [HACKERS] Re: [GENERAL] leap day bug after 1901
Date: 1999-04-13 14:29:16
Message-ID: 371354BC.42A67FDA@alumni.caltech.edu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

> > prova=> select date '1901-02-29';
> > ERROR: date_in: day must be limited to values 1 through 28 in
> > '1901-02-29'
> > prova=> select date '1902-02-29';
> > ----------
> > 1902-03-01
> Any body knows why PostgreSQL checks for date validity only
> for dates less than 1902 and greater than 2037 ?

Yes (and no :) Unix system time goes from ~1902 to ~2038, and the time
zone database included with your system can only work in that range.
So I use system routines for dates within that range and bypass those
(and do not assign time zones) outside that range.

However, I'm puzzled as to why these checks don't seem to be effective
when using dates within this range. Will look at it, and post patches.

Thanks for the report.

- Tom

--
Thomas Lockhart lockhart(at)alumni(dot)caltech(dot)edu
South Pasadena, California

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Thomas Lockhart 1999-04-13 14:48:49 Re: [HACKERS] Gregorian Calendar
Previous Message Valerio Santinelli 1999-04-13 13:51:59 pg_dumpall troubles