Skip to content

Commit

Permalink
debug
Browse files Browse the repository at this point in the history
  • Loading branch information
alex-oleshkevich committed Aug 13, 2024
1 parent 04b05ca commit ea5f372
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion starlette_babel/formatters.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ def format_time(
) -> str:
if rebase:
if isinstance(time, datetime.time):
time = datetime.datetime.now(tz=datetime.UTC).replace(
time = datetime.datetime.now(tz=datetime.timezone.utc).replace(
hour=time.hour,
minute=time.minute,
second=time.second,
Expand Down
2 changes: 1 addition & 1 deletion starlette_babel/timezone.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ def to_utc(dt: datetime.datetime) -> datetime.datetime:

def now() -> datetime.datetime:
"""Get current time in user timezone."""
_now = datetime.datetime.now(datetime.UTC)
_now = datetime.datetime.now(datetime.timezone.utc)
return to_user_timezone(_now)


Expand Down

0 comments on commit ea5f372

Please sign in to comment.