summaryrefslogtreecommitdiff
path: root/django
diff options
context:
space:
mode:
authorRamiro Morales <cramm0@gmail.com>2010-11-21 15:08:53 +0000
committerRamiro Morales <cramm0@gmail.com>2010-11-21 15:08:53 +0000
commit67742073947efe60b103b2ebd07217d2a1c67e9d (patch)
treecd456892ea63829b1740d6ab20c48cc54f170e4c /django
parentf27e6f0dd198309e0d965ca78bf1c5fd04a29f8e (diff)
Fixed #14453 -- Changed handling of microseconds part in typecast_timestamp() DB backend helper function to be more correct. Thanks philipn for the report and fix.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14664 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'django')
-rw-r--r--django/db/backends/util.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/django/db/backends/util.py b/django/db/backends/util.py
index 865508a057..3ed18adb37 100644
--- a/django/db/backends/util.py
+++ b/django/db/backends/util.py
@@ -92,7 +92,7 @@ def typecast_timestamp(s): # does NOT store time zone information
else:
microseconds = '0'
return datetime.datetime(int(dates[0]), int(dates[1]), int(dates[2]),
- int(times[0]), int(times[1]), int(seconds), int(float('.'+microseconds) * 1000000))
+ int(times[0]), int(times[1]), int(seconds), int((microseconds + '000000')[:6]))
def typecast_boolean(s):
if s is None: return None