diff options
| author | Zhongyue Luo <lzyeval@gmail.com> | 2012-05-23 22:17:35 +0800 |
|---|---|---|
| committer | Zhongyue Luo <lzyeval@gmail.com> | 2012-05-25 09:22:33 +0800 |
| commit | 5aca2e2df66c124696589ed3d45aae218fe2c91e (patch) | |
| tree | 0f8647502eb70ae02b460a52410e1f0cc8c171c4 /nova/api | |
| parent | 709d49e9791751911635a923971d8f17757a97cf (diff) | |
| download | nova-5aca2e2df66c124696589ed3d45aae218fe2c91e.tar.gz nova-5aca2e2df66c124696589ed3d45aae218fe2c91e.tar.xz nova-5aca2e2df66c124696589ed3d45aae218fe2c91e.zip | |
Use utils.utcnow rather than datetime.utcnow
Fixes bug #1003587
Edit direct use of datetime.utcnow or datetime.now to utilize utils.utcnow
Change-Id: I1130f6e664f252fc5da7304f495dc9f980721224
Diffstat (limited to 'nova/api')
| -rw-r--r-- | nova/api/openstack/compute/contrib/simple_tenant_usage.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/nova/api/openstack/compute/contrib/simple_tenant_usage.py b/nova/api/openstack/compute/contrib/simple_tenant_usage.py index eb8f86cc8..7914a1dd3 100644 --- a/nova/api/openstack/compute/contrib/simple_tenant_usage.py +++ b/nova/api/openstack/compute/contrib/simple_tenant_usage.py @@ -152,7 +152,7 @@ class SimpleTenantUsageController(object): else: info['state'] = instance['vm_state'] - now = datetime.datetime.utcnow() + now = utils.utcnow() if info['state'] == 'terminated': delta = info['ended_at'] - info['started_at'] |
