Accept new date format of Debian 11
This commit is contained in:
parent
ed19b57841
commit
56b749cba1
1 changed files with 5 additions and 1 deletions
|
@ -10,7 +10,11 @@ import gzip
|
|||
import lzma
|
||||
|
||||
def to_date(s):
|
||||
try:
|
||||
dt=datetime.datetime.strptime(s,"%a %b %d %H:%M:%S %Z %Y")
|
||||
except:
|
||||
dt=datetime.datetime.strptime(s,"%a %d %b %Y %I:%M:%S %p %Z")
|
||||
|
||||
return dt
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue