Commit 6adf7076 authored by Shane Hathaway's avatar Shane Hathaway

Fixed a time zone dependency. connectionDebugInfo() now speaks UTC.

parent a3811ad1
...@@ -757,9 +757,10 @@ class DB(object): ...@@ -757,9 +757,10 @@ class DB(object):
d = '' d = ''
d = "%s (%s)" % (d, len(c._cache)) d = "%s (%s)" % (d, len(c._cache))
# output UTC time with the standard Z time zone indicator
result.append({ result.append({
'opened': o and ("%s (%.2fs)" % ( 'opened': o and ("%s (%.2fs)" % (
time.strftime("%Y-%m-%dT%H:%M:%S", time.localtime(o)), time.strftime("%Y-%m-%dT%H:%M:%SZ", time.gmtime(o)),
t-o)), t-o)),
'info': d, 'info': d,
'before': c.before, 'before': c.before,
......
...@@ -134,10 +134,10 @@ def connectionDebugInfo(): ...@@ -134,10 +134,10 @@ def connectionDebugInfo():
>>> pprint.pprint(sorted(info, key=lambda i: str(i['opened'])), width=1) >>> pprint.pprint(sorted(info, key=lambda i: str(i['opened'])), width=1)
[{'before': None, [{'before': None,
'info': 'test info (2)', 'info': 'test info (2)',
'opened': '2008-12-04T15:40:44 (1.40s)'}, 'opened': '2008-12-04T20:40:44Z (1.40s)'},
{'before': '\x03zY\xd8\xc0m9\xdd', {'before': '\x03zY\xd8\xc0m9\xdd',
'info': ' (0)', 'info': ' (0)',
'opened': '2008-12-04T15:40:45 (0.30s)'}, 'opened': '2008-12-04T20:40:45Z (0.30s)'},
{'before': None, {'before': None,
'info': ' (0)', 'info': ' (0)',
'opened': None}] 'opened': None}]
......
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