Commit 8497126c authored by Shane Hathaway's avatar Shane Hathaway

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

parent bb1a027c
......@@ -757,9 +757,10 @@ class DB(object):
d = ''
d = "%s (%s)" % (d, len(c._cache))
# output UTC time with the standard Z time zone indicator
result.append({
'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)),
'info': d,
'before': c.before,
......
......@@ -134,10 +134,10 @@ def connectionDebugInfo():
>>> pprint.pprint(sorted(info, key=lambda i: str(i['opened'])), width=1)
[{'before': None,
'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',
'info': ' (0)',
'opened': '2008-12-04T15:40:45 (0.30s)'},
'opened': '2008-12-04T20:40:45Z (0.30s)'},
{'before': None,
'info': ' (0)',
'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