>    Then, it seems you are silently truncating days from the value if the
> original timedelta have days.

Yes, TimeCol has a range of 24 hours, TimeCol is the time part of the
DateTimeCol, doing a relation with datetime objects, TimeCol is to
time as DateCol is to date and DateTimeCol is to datetime.

The problem is that mysql uses the same col type either for time type
or interval type (time and timedelta), postgresql in example doesn't
have this misfeature, it have a time type (for time) and an interval
type (for timedelta).

when I do:
                return datetime.time(*time.gmtime(value.seconds)[3:6])

... I am getting the hour, minute and second for the gmtime ([3:6]),
if the timedelta is in the limit of 24 hours, year, month, and day are
1970, 1, 1.

> I think we must at least raise an exception.
>    What do you think?

I agree! That was my fault, sorry, what should I raise? TypeError?
Regards!


-- 
Michel Thadeu Sabchuk
Curitiba - Brasil

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
sqlobject-discuss mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sqlobject-discuss

Reply via email to