Problem: Issue #1, timespec not present in <= Python 3.5
parent
7254ad8286
commit
a6ae0e464e
@ -0,0 +1,7 @@
|
||||
def isoformatseconds(dt):
|
||||
try:
|
||||
return dt.isoformat(timespec="seconds")
|
||||
except TypeError:
|
||||
# Python 3.5 and below
|
||||
# 'timespec' is an invalid keyword argument for this function
|
||||
return dt.isoformat().split(".")[0]
|
Loading…
Reference in New Issue