Skip to content

Commit

Permalink
Timezone aware
Browse files Browse the repository at this point in the history
  • Loading branch information
salvatorelaiso authored Jul 26, 2023
1 parent a0b02fd commit a293df0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pyeudiw/tools/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@ def make_timezone_aware(dt: datetime.datetime):


def iat_now() -> int:
return int(datetime.datetime.now().timestamp())
return int(datetime.datetime.now().timestamp(datetime.timezone.utc))


def exp_from_now(minutes: int = 33) -> int:
now = datetime.datetime.now()
now = datetime.datetime.now(datetime.timezone.utc)
return int((now + datetime.timedelta(minutes=minutes)).timestamp())


Expand Down

0 comments on commit a293df0

Please sign in to comment.