mirror of
https://cdm-project.com/Download-Tools/devine.git
synced 2025-05-24 00:32:08 +02:00
Add support for JS-style 13-char timestamps to Cacher
This commit is contained in:
parent
ddf1c519e0
commit
36c530ccc6
@ -150,6 +150,8 @@ class Cacher:
|
||||
except ValueError:
|
||||
timestamp = float(timestamp)
|
||||
try:
|
||||
if len(str(int(timestamp))) == 13: # JS-style timestamp
|
||||
timestamp /= 1000
|
||||
timestamp = datetime.fromtimestamp(timestamp)
|
||||
except ValueError:
|
||||
raise ValueError(f"Unrecognized Timestamp value {timestamp!r}")
|
||||
|
Loading…
x
Reference in New Issue
Block a user