mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
Closes Issue#22241: timezone.utc name is now plain 'UTC', not 'UTC-00:00'.
This commit is contained in:
parent
40dc328cc2
commit
7827a5b7c2
5 changed files with 23 additions and 8 deletions
|
@ -1920,6 +1920,8 @@ class timezone(tzinfo):
|
|||
|
||||
@staticmethod
|
||||
def _name_from_offset(delta):
|
||||
if not delta:
|
||||
return 'UTC'
|
||||
if delta < timedelta(0):
|
||||
sign = '-'
|
||||
delta = -delta
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue