Skip to content

Commit

Permalink
Simplify
Browse files Browse the repository at this point in the history
  • Loading branch information
bachya committed Sep 18, 2023
1 parent 9738bd4 commit 113950f
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions simplipy/util/dt.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
"""Define datetime utilities."""
from datetime import datetime, timezone

UTC = timezone.utc


def utc_from_timestamp(timestamp: float) -> datetime:
"""Return a UTC time from a timestamp.
Expand All @@ -13,4 +11,4 @@ def utc_from_timestamp(timestamp: float) -> datetime:
Returns:
A parsed ``datetime.datetime`` object.
"""
return datetime.fromtimestamp(timestamp, tz=UTC)
return datetime.fromtimestamp(timestamp, tz=timezone.utc)

0 comments on commit 113950f

Please sign in to comment.