mirror of
https://github.com/vladmandic/automatic
synced 2026-09-19 17:24:32 +02:00
fix ts2utc
Co-authored-by: Copilot <copilot@github.com> Signed-off-by: Vladimir Mandic <mandic00@live.com>
This commit is contained in:
@@ -35,7 +35,10 @@ def format_dt(d: datetime, seconds = False) -> str:
|
||||
|
||||
|
||||
def ts2utc(timestamp: int) -> datetime:
|
||||
return datetime.fromtimestamp(timestamp, timezone.utc)
|
||||
try:
|
||||
return datetime.fromtimestamp(timestamp, timezone.utc)
|
||||
except Exception:
|
||||
return datetime(2000, 1, 1, tzinfo=timezone.utc)
|
||||
|
||||
|
||||
def active() -> list[Extension]:
|
||||
|
||||
Reference in New Issue
Block a user