summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdrian Holovaty <adrian@holovaty.com>2006-01-15 05:54:47 +0000
committerAdrian Holovaty <adrian@holovaty.com>2006-01-15 05:54:47 +0000
commit6e50a2ef5d7530ffe29c069cc5ff5613cb5f3045 (patch)
treed01b99ef2dbcabd32a87760015a15a77bd894447
parent2667ead8850cb767c798149f781449c5b37d7367 (diff)
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
-rw-r--r--django/core/db/typecasts.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/django/core/db/typecasts.py b/django/core/db/typecasts.py
index e78eab0180..9be9062626 100644
--- a/django/core/db/typecasts.py
+++ b/django/core/db/typecasts.py
@@ -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 09:56:00-05"
if not s: return None
+ if not ' ' in s: return typecast_date(s)
d, t = s.split()
# Extract timezone information, if it exists. Currently we just throw
# it away, but in the future we may make use of it.