Skip to content

Commit e4435ec

Browse files
committed
patch utility.datetime_to_iso
1 parent d8408ad commit e4435ec

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

github/utility/convert.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ def datetime_to_iso(
2828
github.utility.warn_once(
2929
"using timezone-unaware datetime is not recommended, use aware datetime instead. for example, use datetime.now(timezone.utc) instead of "
3030
"datetime.utcnow(). assuming UTC for now.",
31-
github.ClientDeprecationWarning,
32-
2,
31+
cls=github.ClientDeprecationWarning,
32+
level=2,
3333
)
3434

3535
if not offset:
@@ -47,8 +47,8 @@ def datetime_to_iso(
4747
if rest:
4848
github.utility.warn_once(
4949
"using timezone with second or millisecond offset is not allowed. truncating to hours and minutes.",
50-
github.ClientDeprecationWarning,
51-
2,
50+
cls=github.ClientDeprecationWarning,
51+
level=2,
5252
)
5353

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

0 commit comments

Comments
 (0)