diff options
author | Zhongyue Luo <lzyeval@gmail.com> | 2012-06-06 10:32:49 +0800 |
---|---|---|
committer | Zhongyue Luo <lzyeval@gmail.com> | 2012-06-16 07:17:01 +0800 |
commit | 9ff3121bd90133fb3b37c0e10407b5f7ade26b90 (patch) | |
tree | 9c3d48c0b49f89374813c23dc49bc7ded34ed414 /nova/notifications.py | |
parent | fb9abcc83935b01746aeba0db4c431fe72b921fc (diff) | |
download | nova-9ff3121bd90133fb3b37c0e10407b5f7ade26b90.tar.gz nova-9ff3121bd90133fb3b37c0e10407b5f7ade26b90.tar.xz nova-9ff3121bd90133fb3b37c0e10407b5f7ade26b90.zip |
Replaces functions in utils.py with openstack/common/timeutils.py
Fixes bug #1008628
1. Edit openstack-common.conf and import nova/openstack/common/timeutils.py
2. Move time related functions from utils.py to timeutils.py
3. Replace following functions in utils.py with timeutils.py
- isotime
- parse_isotime
- strtime
- parse_strtime
- normalize_time
- is_older_than
- utcnow_ts
- utcnow
- set_time_override
- advance_time_delta
- advance_time_seconds
- clear_time_override
4. Remove datetime related functions and datetime related unittests
Change-Id: I9a92be286fb071b6237dd39495d88dae106e2ce0
Diffstat (limited to 'nova/notifications.py')
-rw-r--r-- | nova/notifications.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/nova/notifications.py b/nova/notifications.py index e83098b20..05c1f7237 100644 --- a/nova/notifications.py +++ b/nova/notifications.py @@ -28,6 +28,7 @@ from nova import network from nova.network import model as network_model from nova.notifier import api as notifier_api from nova.openstack.common import cfg +from nova.openstack.common import timeutils from nova import utils LOG = log.getLogger(__name__) @@ -140,7 +141,7 @@ def audit_period_bounds(current_period=False): begin, end = utils.last_completed_audit_period() if current_period: audit_start = end - audit_end = utils.utcnow() + audit_end = timeutils.utcnow() else: audit_start = begin audit_end = end |