Add datetime check to django.db.backends.util date/time functions
|Reported by:||Owned by:||Adrian Holovaty|
|Component:||Database layer (models, ORM)||Version:||master|
|Has patch:||no||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
Currently if you pass datetime types to the typecast_time and typecast_timestamp functions, they throw TypeErrors. A simple change enhances the functionality of these functions (attached a patch) in that if you pass a date/time/datetime, it simply returns it. Passing a different type to a function of the wrong type still returns raises exceptions as it does now.
Patch is against changeset:4086.