Code

Ticket #1062: typecast.diff

File typecast.diff, 539 bytes (added by Nebojša Đorđević - nesh <nesh@…>, 9 years ago)

slightly different patch

Line 
1Index: django/core/db/typecasts.py
2===================================================================
3--- django/core/db/typecasts.py (revision 1884)
4+++ django/core/db/typecasts.py (working copy)
5@@ -20,6 +20,7 @@
6     # "2005-07-29 15:48:00.590358-05"
7     # "2005-07-29 09:56:00-05"
8     if not s: return None
9+    if not ' ' in s: return typecast_date(s) # fix SQLite bug (#1062)
10     d, t = s.split()
11     # Extract timezone information, if it exists. Currently we just throw
12     # it away, but in the future we may make use of it.