Replace datetime.utcnow with timeutils.utcnow
Fixes bug #1008064 Replaced datetime.utcnow usage with timeutils.utcnow Change-Id: I8bfdc1abefc3891497554335a3078d4028ef8ac9
This commit is contained in:
@@ -30,7 +30,7 @@ TIME_FORMAT = "%Y-%m-%dT%H:%M:%S"
|
||||
def isotime(at=None):
|
||||
"""Stringify time in ISO 8601 format"""
|
||||
if not at:
|
||||
at = datetime.datetime.utcnow()
|
||||
at = utcnow()
|
||||
str = at.strftime(TIME_FORMAT)
|
||||
tz = at.tzinfo.tzname(None) if at.tzinfo else 'UTC'
|
||||
str += ('Z' if tz == 'UTC' else tz)
|
||||
|
||||
Reference in New Issue
Block a user