Re: BC date getting misinterpreted?

From: Christophe Pettus <xof(at)thebuild(dot)com>
To: Joe Abbate <jma(at)freedomcircle(dot)com>
Cc: psycopg(at)postgresql(dot)org
Subject: Re: BC date getting misinterpreted?
Date: 2018-03-26 23:15:14
Message-ID: 7BED4280-DF86-4FD6-91BC-C68420E83AEA@thebuild.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: psycopg

In both 2.7 and 3.6, datetime.MINYEAR is 1, so I'm a bit surprised this ever worked.

> On Mar 26, 2018, at 16:11, Joe Abbate <jma(at)freedomcircle(dot)com> wrote:
>
> The test case is fairly simple:
>
> curs.execute("SELECT '044-03-15 BC'::date")
> rows = curs.fetchall()
>
> This results in:
>
> ValueError: year -43 is out of range
>
> [This is Python 3.6, in 2.7, the value is missing]
>
> This was working since last October, but the error started happening around the Ides of March (my actual dates are different, but I changed the example to fit :-)
>
> Tested against 9.3 thru 10.
>
> Joe
>

--
-- Christophe Pettus
xof(at)thebuild(dot)com

In response to

Responses

Browse psycopg by date

  From Date Subject
Next Message Christophe Pettus 2018-03-26 23:20:00 Re: BC date getting misinterpreted?
Previous Message Joe Abbate 2018-03-26 23:11:55 BC date getting misinterpreted?