From c0c702a5e3284e843e680064b4c6a7280242c567 Mon Sep 17 00:00:00 2001 From: "Matt A. Tobin" Date: Fri, 2 Feb 2018 12:00:37 -0500 Subject: Use UTC where appropriate in python files --- addon-sdk/source/python-lib/mozrunner/killableprocess.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'addon-sdk/source/python-lib/mozrunner') 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 -- cgit v1.2.3