Skip to content

Commit

Permalink
patch utility.datetime_to_iso
Browse files Browse the repository at this point in the history
  • Loading branch information
ShineyDev committed Jan 25, 2025
1 parent d8408ad commit e4435ec
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions github/utility/convert.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ def datetime_to_iso(
github.utility.warn_once(
"using timezone-unaware datetime is not recommended, use aware datetime instead. for example, use datetime.now(timezone.utc) instead of "
"datetime.utcnow(). assuming UTC for now.",
github.ClientDeprecationWarning,
2,
cls=github.ClientDeprecationWarning,
level=2,
)

if not offset:
Expand All @@ -47,8 +47,8 @@ def datetime_to_iso(
if rest:
github.utility.warn_once(
"using timezone with second or millisecond offset is not allowed. truncating to hours and minutes.",
github.ClientDeprecationWarning,
2,
cls=github.ClientDeprecationWarning,
level=2,
)

offset = f"{sign}{hours:>02}:{minutes:>02}"
Expand Down

0 comments on commit e4435ec

Please sign in to comment.