From: Oleg B. <ph...@ph...> - 2005-07-03 09:31:23
|
On Sun, Jul 03, 2005 at 12:27:36AM +0200, Ksenia Marasanova wrote: > It seems that toPython method of DateTimeValidator doesn't use > mx.DateTime module at the end, even if it is available. You messed DateTimeValidator and MXDateTimeValidator. (-: > It causes > problem with years before 1900. > This little patch should fix the problem. from sqlobject import * from sqlobject import col if mxdatetime_available: # Force to use mxDateTime col.default_datetime_implementation = MXDATETIME_IMPLEMENTATION class DateTime2(SQLObject): col1 = DateCol() col2 = DateTimeCol() Look at test_datetime.py for an example. Oleg. -- Oleg Broytmann http://phd.pp.ru/ ph...@ph... Programmers don't die, they just GOSUB without RETURN. |