diff options
author | Alexander Belopolsky <alexander.belopolsky@gmail.com> | 2015-09-06 17:07:21 (GMT) |
---|---|---|
committer | Alexander Belopolsky <alexander.belopolsky@gmail.com> | 2015-09-06 17:07:21 (GMT) |
commit | 7827a5b7c29ae71daf0175ce3398115374ceb50e (patch) | |
tree | 275c926de9cbabbcd65ba73ea0599d1fe0aafeb3 /Lib/datetime.py | |
parent | 40dc328cc2b51a008dd303776e6f7529260ddf15 (diff) | |
download | cpython-7827a5b7c29ae71daf0175ce3398115374ceb50e.zip cpython-7827a5b7c29ae71daf0175ce3398115374ceb50e.tar.gz cpython-7827a5b7c29ae71daf0175ce3398115374ceb50e.tar.bz2 |
Closes Issue#22241: timezone.utc name is now plain 'UTC', not 'UTC-00:00'.
Diffstat (limited to 'Lib/datetime.py')
-rw-r--r-- | Lib/datetime.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Lib/datetime.py b/Lib/datetime.py index 3bf9edc..6b2ac33 100644 --- a/Lib/datetime.py +++ b/Lib/datetime.py @@ -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 |