Drop support for Python 3.6 (#1004)

* Drop support for Python 3.6
* Remove unused time parsing function
* Use Python 3.7 datetime function for writing stats data conversion
* Test against Python 3.10 on macOS and Windows
This commit is contained in:
Veronica Berglyd Olsen
2022-02-20 23:35:33 +01:00
committed by GitHub
parent 045a595537
commit 011291f225
13 changed files with 22 additions and 57 deletions
-13
View File
@@ -241,19 +241,6 @@ def formatTime(tS):
return "ERROR"
def parseTimeStamp(theStamp, default, allowNone=False):
"""Parses a text representation of a timestamp and converts it into
a float. Note that negative timestamps cause an OSError on Windows.
See https://bugs.python.org/issue29097
"""
if str(theStamp).lower() == "none" and allowNone:
return None
try:
return datetime.strptime(theStamp, nwConst.FMT_TSTAMP).timestamp()
except Exception:
return default
# =============================================================================================== #
# String Functions
# =============================================================================================== #