summaryrefslogtreecommitdiffstats
path: root/addon-sdk/source/python-lib
diff options
context:
space:
mode:
authorMatt A. Tobin <email@mattatobin.com>2018-02-02 12:00:37 -0500
committerMatt A. Tobin <email@mattatobin.com>2018-02-02 12:00:37 -0500
commitc0c702a5e3284e843e680064b4c6a7280242c567 (patch)
tree59332b13537a0c006c090ae925e8d3be50bb4699 /addon-sdk/source/python-lib
parent45d4933f568d8814d8045852a9a1b006b912dcf7 (diff)
downloadUXP-c0c702a5e3284e843e680064b4c6a7280242c567.tar
UXP-c0c702a5e3284e843e680064b4c6a7280242c567.tar.gz
UXP-c0c702a5e3284e843e680064b4c6a7280242c567.tar.lz
UXP-c0c702a5e3284e843e680064b4c6a7280242c567.tar.xz
UXP-c0c702a5e3284e843e680064b4c6a7280242c567.zip
Use UTC where appropriate in python files
Diffstat (limited to 'addon-sdk/source/python-lib')
-rw-r--r--addon-sdk/source/python-lib/mozrunner/killableprocess.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/addon-sdk/source/python-lib/mozrunner/killableprocess.py b/addon-sdk/source/python-lib/mozrunner/killableprocess.py
index daf52f0c9..21eac6965 100644
--- a/addon-sdk/source/python-lib/mozrunner/killableprocess.py
+++ b/addon-sdk/source/python-lib/mozrunner/killableprocess.py
@@ -217,7 +217,7 @@ class Popen(subprocess.Popen):
# timeout is now in milliseconds
timeout = timeout * 1000
- starttime = datetime.datetime.now()
+ starttime = datetime.datetime.utcnow()
if mswindows:
if timeout is None:
@@ -234,7 +234,7 @@ class Popen(subprocess.Popen):
# Returns 1 if running, 0 if not, -1 if timed out
def check():
- now = datetime.datetime.now()
+ now = datetime.datetime.utcnow()
diff = now - starttime
if (diff.seconds * 1000000 + diff.microseconds) < (timeout * 1000): # (1000*1000)
if self._job:
@@ -302,7 +302,7 @@ class Popen(subprocess.Popen):
returncode = False
- now = datetime.datetime.now()
+ now = datetime.datetime.utcnow()
diff = now - starttime
while (diff.seconds * 1000 * 1000 + diff.microseconds) < (timeout * 1000) and ( returncode is False ):
if group is True:
@@ -311,7 +311,7 @@ class Popen(subprocess.Popen):
if subprocess.poll() is not None:
returncode = self.returncode
time.sleep(.5)
- now = datetime.datetime.now()
+ now = datetime.datetime.utcnow()
diff = now - starttime
return self.returncode