summaryrefslogtreecommitdiff
path: root/Lib/datetime.py
diff options
context:
space:
mode:
authorZachary Ware <zachary.ware@gmail.com>2015-12-21 14:17:12 -0600
committerZachary Ware <zachary.ware@gmail.com>2015-12-21 14:17:12 -0600
commitf2b234443c53cb73dc749da57d952286437cb15a (patch)
treef21b8b25f5bfbe76a2c85ae62f6d06060dd03372 /Lib/datetime.py
parent26b842a82d9ae7d30c692080bf352a0ef78a626c (diff)
parent977fd6d7c6593680fd5ffdebb262a2a3f2f24387 (diff)
downloadcpython-f2b234443c53cb73dc749da57d952286437cb15a.tar.gz
Issue #25827: Merge with 3.5
Diffstat (limited to 'Lib/datetime.py')
-rw-r--r--Lib/datetime.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/Lib/datetime.py b/Lib/datetime.py
index b9719cbb48..b734a743d0 100644
--- a/Lib/datetime.py
+++ b/Lib/datetime.py
@@ -316,6 +316,7 @@ def _divide_and_round(a, b):
return q
+
class timedelta:
"""Represent the difference between two datetime objects.
@@ -1912,6 +1913,8 @@ class timezone(tzinfo):
@staticmethod
def _name_from_offset(delta):
+ if not delta:
+ return 'UTC'
if delta < timedelta(0):
sign = '-'
delta = -delta