| Server IP : 37.9.174.138 / Your IP : 216.73.216.117 Web Server : Apache System : Linux vps6.backend.sk 6.12.100+deb13-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.12.100-1 (2026-07-30) x86_64 User : ftpuser ( 1001) PHP Version : 8.4.24 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /usr/lib/python3/dist-packages/pyrfc3339/ |
Upload File : |
def format_timezone(utcoffset):
"""
Return a string representing the timezone offset.
Remaining seconds are rounded to the nearest minute.
>>> format_timezone(3600)
'+01:00'
>>> format_timezone(5400)
'+01:30'
>>> format_timezone(-28800)
'-08:00'
"""
hours, seconds = divmod(abs(utcoffset), 3600)
minutes = round(float(seconds) / 60)
if utcoffset >= 0:
sign = "+"
else:
sign = "-"
return "{0}{1:02d}:{2:02d}".format(sign, int(hours), int(minutes))