diff options
Diffstat (limited to 'Lib/test/support')
-rw-r--r-- | Lib/test/support/testresult.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/Lib/test/support/testresult.py b/Lib/test/support/testresult.py index 2cd1366..14474be 100644 --- a/Lib/test/support/testresult.py +++ b/Lib/test/support/testresult.py @@ -18,10 +18,13 @@ class RegressionTestResult(unittest.TextTestResult): self.buffer = True if self.USE_XML: from xml.etree import ElementTree as ET - from datetime import datetime + from datetime import datetime, UTC self.__ET = ET self.__suite = ET.Element('testsuite') - self.__suite.set('start', datetime.utcnow().isoformat(' ')) + self.__suite.set('start', + datetime.now(UTC) + .replace(tzinfo=None) + .isoformat(' ')) self.__e = None self.__start_time = None |