Skip to content

Commit 2b835ec

Browse files
committed
Fix format specifiers in get_fixed_timezone
1 parent fca9e01 commit 2b835ec

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/marshmallow/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ def get_fixed_timezone(offset: int | float | dt.timedelta) -> dt.timezone:
138138
if isinstance(offset, dt.timedelta):
139139
offset = offset.total_seconds() // 60
140140
sign = "-" if offset < 0 else "+"
141-
hhmm = "%02d%02d".format(*divmod(abs(offset), 60))
141+
hhmm = "{:02d}{:02d}".format(*divmod(abs(offset), 60))
142142
name = sign + hhmm
143143
return dt.timezone(dt.timedelta(minutes=offset), name)
144144

0 commit comments

Comments
 (0)