Ticket #6642: django_db_backends_utils.patch
File django_db_backends_utils.patch, 677 bytes (added by , 17 years ago) |
---|
-
django/db/backends/util.py
46 46 ############################################### 47 47 48 48 def typecast_date(s): 49 return s and datetime.date(*map(int, s.split('-'))) or None # returns None if s is null 49 sd = map(int, s.split('-')) 50 if 0 in sd: 51 # 0 is not a valid year, month or day 52 return None # should raise error here ? 53 return s and datetime.date(*sd) or None # returns None if s is null 50 54 51 55 def typecast_time(s): # does NOT store time zone information 52 56 if not s: return None