[bridgedb/master] 5482 - Fix timestamp formatting

commit 23c708ac336a1e171d30ea904343aec9bd13d4da Author: aagbsn <aagbsn@extc.org> Date: Sun Nov 4 07:21:03 2012 -0800 5482 - Fix timestamp formatting %M and %m should be reversed. --- lib/bridgedb/Bridges.py | 2 +- lib/bridgedb/Tests.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/bridgedb/Bridges.py b/lib/bridgedb/Bridges.py index d67d621..223a78d 100644 --- a/lib/bridgedb/Bridges.py +++ b/lib/bridgedb/Bridges.py @@ -351,7 +351,7 @@ def parseDescFile(f, bridge_purpose='bridge'): elif line.startswith("published "): if line.startswith("published "): try: - timestamp = time.strptime(line[10:],"%Y-%M-%d %H:%m:%S") + timestamp = time.strptime(line[10:],"%Y-%m-%d %H:%M:%S") timestamp = time.mktime(timestamp) except ValueError: timestamp = None elif line.startswith("router-signature"): diff --git a/lib/bridgedb/Tests.py b/lib/bridgedb/Tests.py index 383ad57..505a7b7 100644 --- a/lib/bridgedb/Tests.py +++ b/lib/bridgedb/Tests.py @@ -160,7 +160,7 @@ simpleDesc = "router Unnamed %s %s 0 9030\n"\ "opt @purpose bridge\n" orAddress = "or-address %s:%s\n" def gettimestamp(): - ts = time.strftime("%Y-%M-%d %H:%m:%S") + ts = time.strftime("%Y-%m-%d %H:%M:%S") return "opt published %s\n" % ts class RhymesWith255Category:
participants (1)
-
aagbsn@torproject.org