[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[or-cvs] r21878: {projects} Fix exonerator.py on Windows. (projects/archives/trunk/exonerator)



Author: kloesing
Date: 2010-03-08 23:19:06 +0000 (Mon, 08 Mar 2010)
New Revision: 21878

Modified:
   projects/archives/trunk/exonerator/exonerator.py
Log:
Fix exonerator.py on Windows.


Modified: projects/archives/trunk/exonerator/exonerator.py
===================================================================
--- projects/archives/trunk/exonerator/exonerator.py	2010-03-08 23:03:41 UTC (rev 21877)
+++ projects/archives/trunk/exonerator/exonerator.py	2010-03-08 23:19:06 UTC (rev 21878)
@@ -30,11 +30,9 @@
         relayIP = IP(args[0])
     except ValueError:
         parser.error("invalid IP address in question: '%s'" % args[0])
-    timestampStr = "%s %s" % (args[1], args[2])
-    os.environ['TZ'] = 'UTC'
-    time.tzset()
+    timestampStr = "%s %s UTC" % (args[1], args[2])
     try:
-        timestamp = time.strptime(timestampStr, "%Y-%m-%d %H:%M:%S")
+        timestamp = time.strptime(timestampStr, "%Y-%m-%d %H:%M:%S %Z")
     except ValueError:
         parser.error("incorrect time format: '%s'" % timestampStr)
     # if a target is given, parse address and possibly port part of it