Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fixed #6486 -- Added local server time to the debug output page. Patc…

…h from

Bastian Kleineidam and Thomas Güttler.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@7333 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit c01e6b852ab652e9ba3f7d3ac43cd5d20802a215 1 parent f8578d7
@malcolmt malcolmt authored
Showing with 6 additions and 0 deletions.
  1. +6 −0 django/views/debug.py
View
6 django/views/debug.py
@@ -1,6 +1,7 @@
import os
import re
import sys
+import datetime
from django.conf import settings
from django.template import Template, Context, TemplateDoesNotExist
@@ -158,6 +159,7 @@ def get_traceback_html(request, exc_type, exc_value, tb):
'settings': get_safe_settings(),
'sys_executable': sys.executable,
'sys_version_info': '%d.%d.%d' % sys.version_info[0:3],
+ 'server_time': datetime.datetime.now(),
'django_version_info': get_version(),
'sys_path' : sys.path,
'template_info': template_info,
@@ -389,6 +391,10 @@ def _get_lines_from_file(filename, lineno, context_lines, loader=None, module_na
<th>Python Path:</th>
<td>{{ sys_path }}</td>
</tr>
+ <tr>
+ <th>Server time:</th>
+ <td>{{server_time|date:"r"}}</td>
+ </tr>
</table>
</div>
{% if unicode_hint %}
Please sign in to comment.
Something went wrong with that request. Please try again.