mirror of
https://github.com/meeb/tubesync.git
synced 2025-06-26 06:56:36 +00:00
Update timestamp.py
This commit is contained in:
parent
2cad19f5ad
commit
a05968e561
@ -1,5 +1,4 @@
|
||||
import datetime
|
||||
from django.utils import timezone
|
||||
|
||||
|
||||
posix_epoch = datetime.datetime.utcfromtimestamp(0)
|
||||
@ -13,6 +12,7 @@ def add_epoch(seconds):
|
||||
return timedelta(seconds=seconds) + posix_epoch
|
||||
|
||||
def subtract_epoch(arg_dt, /):
|
||||
assert isinstance(arg_dt, datetime.datetime)
|
||||
epoch = posix_epoch.astimezone(utc_tz)
|
||||
utc_dt = arg_dt.astimezone(utc_tz)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user