iso8601.is8601.Utc No Longer Exists
iso8601.UTC is correct datetime UTC field object. iso8601 >= 0.1.12 includes only iso8601.UTC for python3 while both UTC and Utc() for python2. Less then 0.1.12 included both UTC and Utc() for both python2/3. Change-Id: I0f8796fba6725eea013b3f8d9ad33c10a402c524 Closes-Bug: #1715486
This commit is contained in:
@@ -41,7 +41,7 @@ def datetime_or_none(value, tzinfo_aware=False):
|
||||
# NOTE(danms): Legacy objects from sqlalchemy are stored in UTC,
|
||||
# but are returned without a timezone attached.
|
||||
# As a transitional aid, assume a tz-naive object is in UTC.
|
||||
value = value.replace(tzinfo=iso8601.iso8601.Utc())
|
||||
value = value.replace(tzinfo=iso8601.UTC)
|
||||
elif not tzinfo_aware:
|
||||
value = value.replace(tzinfo=None)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user