summaryrefslogtreecommitdiffstats
path: root/openstack/common/plugin/pluginmanager.py
diff options
context:
space:
mode:
authorYunhong, Jiang <yunhong.jiang@intel.com>2012-09-11 16:04:03 +0800
committerYunhong, Jiang <yunhong.jiang@intel.com>2012-09-13 17:50:34 +0800
commitb81938dc2fec8f6e15b0b3dcb8eabc276e647af4 (patch)
tree388a0c8a56bb74104680cc1e8479420194124c6f /openstack/common/plugin/pluginmanager.py
parent2265258dad5c6a1e535336867d9cea5c7a2355d3 (diff)
downloadoslo-b81938dc2fec8f6e15b0b3dcb8eabc276e647af4.tar.gz
oslo-b81938dc2fec8f6e15b0b3dcb8eabc276e647af4.tar.xz
oslo-b81938dc2fec8f6e15b0b3dcb8eabc276e647af4.zip
Normalize_time() always return naive object
Currently the timeutils.normalize_time() returns naive datetime object when parameter timestamp is an naive object or a non-UTC aware datetime object, and returns aware datetime object if parameter timestamp is a UTC aware datetime object. The basic problem here is that utcoffset() of None means the object is naive but a utcoffset() of zero means that the object is aware but represents UTC time. This is fragile implementation and will trigger potential issue, because aware/native datetime is not interoperatable. For example, "timeutils.utcnow() > timeutils.normalize_time(m)" will success at most time, while trigger TypeError if m is a UTC aware object. We want to normalize all objects into naive objects. Fixes bug 1048636 Change-Id: I4a09246fa8f0dd63ca54362b877aa825d9b79772 Signed-off-by: Yunhong, Jiang <yunhong.jiang@intel.com>
Diffstat (limited to 'openstack/common/plugin/pluginmanager.py')
0 files changed, 0 insertions, 0 deletions