Fixed date mapping problem
MySQL database connector for Python programming
Brought to you by:
adustman
Look at the patch and then consider this:
from datetime import datetime, timedelta
type(datetime), type(timedelta), type(timedelta) is
type(datetime)
(<type 'type'="">, <type 'type'="">, True)
Now consider the conversion map
conversions = {
types.IntType: Thing2Str,
...
DateTimeType: DateTime2literal,
DateTimeDeltaType: DateTimeDelta2literal,
...
}
So we were all just lucky that DateTime2literal and
DateTimeDelta2literal aren't needed in the pydatetime
case :-)
unified diff
Logged In: YES
user_id=71372
Pretty sure this is fixed for awhile now; reopen if you fix
otherwise.