implement 'datetime_to_timestamp()'

and rename 'to_timestamp()'
to the more descriptive 'datetime_to_timestamp_string()'
This commit is contained in:
Mike Fährmann
2022-03-23 22:20:37 +01:00
parent c0c1277c5f
commit 29db716a63
4 changed files with 19 additions and 5 deletions

View File

@@ -183,7 +183,7 @@ class Extractor():
elif until:
if isinstance(until, datetime.datetime):
# convert to UTC timestamp
until = (until - util.EPOCH) / util.SECOND
until = util.datetime_to_timestamp(until)
else:
until = float(until)
seconds = until - now