Re: #203: Timestamps "BC" raise "ValueError: second must be in 0..59"
"James Henstridge" <[email protected]>
| Newsgroups | gmane.comp.python.db.psycopg.devel |
|---|---|
| Message-ID | <[email protected]> |
On 15/01/2008, Tim Roberts <[email protected]> wrote: > James Henstridge wrote: > > There is mxDateTime support in psycopg2, so perhaps fixing the parsing > > code to handle BC would be enough when it is compiled in that mode. > > > > But if you use the mxDateTime support, I thought it used mxDateTime for > the parsing, so it should Just Work. Have you tried it? Yes, I did try it. The same parsing code is used for both the datetime and mx.DateTime cases. I've got a partially complete patch that should help here (produce a "year is out of range" error for datetime, and correct results for mx.DateTime). I'll post it when it works and has tests. James.