Kaydet (Commit) 6e50a2ef authored tarafından Adrian Holovaty's avatar Adrian Holovaty

Fixed #1062 -- Fixed database typecasting bug for DateTimeFields in SQLite.…

Fixed #1062 -- Fixed database typecasting bug for DateTimeFields in SQLite. Thanks, Nesh and cmaloney

git-svn-id: http://code.djangoproject.com/svn/django/trunk@1971 bcc190cf-cafb-0310-a4f2-bffc1f526a37
üst 2667ead8
...@@ -20,6 +20,7 @@ def typecast_timestamp(s): # does NOT store time zone information ...@@ -20,6 +20,7 @@ def typecast_timestamp(s): # does NOT store time zone information
# "2005-07-29 15:48:00.590358-05" # "2005-07-29 15:48:00.590358-05"
# "2005-07-29 09:56:00-05" # "2005-07-29 09:56:00-05"
if not s: return None if not s: return None
if not ' ' in s: return typecast_date(s)
d, t = s.split() d, t = s.split()
# Extract timezone information, if it exists. Currently we just throw # Extract timezone information, if it exists. Currently we just throw
# it away, but in the future we may make use of it. # it away, but in the future we may make use of it.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment