Skip to content

Commit

Permalink
added timezone import
Browse files Browse the repository at this point in the history
  • Loading branch information
clr182 committed Nov 1, 2024
1 parent cffa22a commit 778136f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions bugsnag/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import warnings
import copy
import logging
from datetime import datetime, timedelta
from datetime import datetime, timedelta, timezone
from urllib.parse import urlparse, urlunsplit, parse_qs


Expand Down Expand Up @@ -424,7 +424,7 @@ def remove_query_from_url(url: AnyStr) -> Optional[AnyStr]:
# fallback implementation for Python 3.5
try:
# this will raise if 'timespec' isn't supported
datetime.now(timezone.utc).isoformat(timespec='milliseconds') # type: ignore
datetime.now(timezone.utc).isoformat(timespec='milliseconds')

def to_rfc3339(dt: datetime) -> str:
return dt.isoformat(timespec='milliseconds') # type: ignore
Expand Down

0 comments on commit 778136f

Please sign in to comment.