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:
committed by
GitHub
parent
045a595537
commit
011291f225
@@ -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
|
||||
# =============================================================================================== #
|
||||
|
||||
Reference in New Issue
Block a user