Merge "Handle TZ change in iso8601 >=0.1.12"

This commit is contained in:
Zuul 2018-02-05 04:33:36 +00:00 committed by Gerrit Code Review
commit 24182de256
1 changed files with 2 additions and 1 deletions

View File

@ -81,7 +81,8 @@ def isotime(at=None, subsecond=False):
if not subsecond
else _ISO8601_TIME_FORMAT_SUBSECOND)
tz = at.tzinfo.tzname(None) if at.tzinfo else 'UTC'
st += ('Z' if tz == 'UTC' else tz)
# Need to handle either iso8601 or python UTC format
st += ('Z' if tz in ['UTC', 'UTC+00:00'] else tz)
return st