From 31245bd6fb31370df865673164cb71b78d6c8240 Mon Sep 17 00:00:00 2001 From: Mark McClain Date: Thu, 15 Mar 2012 15:47:23 -0400 Subject: [PATCH] fix timestamps to match documented ec2 api fixes bug: 823503 Update to the dateTime format to provide three places of precision to microseconds. This change makes the API match the ec2 documents. Change-Id: I765e64e99042ade9fa996dfb1dee603d363f9b2c --- Authors | 1 + nova/tests/test_api.py | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Authors b/Authors index afe7be3f8..31ced6e8e 100644 --- a/Authors +++ b/Authors @@ -119,6 +119,7 @@ Loganathan Parthipan Lorin Hochstein Lvov Maxim Mandell Degerness +Mark McClain Mark McLoughlin Mark Washenberger Maru Newby diff --git a/nova/tests/test_api.py b/nova/tests/test_api.py index 2b46be867..473e1d5f9 100644 --- a/nova/tests/test_api.py +++ b/nova/tests/test_api.py @@ -242,14 +242,14 @@ class ApiEc2TestCase(test.TestCase): "%Y-%m-%d %H:%M:%S.%f") self.assertEqual( conv(time_to_convert), - '2011-02-21T20:14:10Z') + '2011-02-21T20:14:10.634Z') # mysqlite database representation time_to_convert = datetime.datetime.strptime( "2011-02-21 19:56:18", "%Y-%m-%d %H:%M:%S") self.assertEqual( conv(time_to_convert), - '2011-02-21T19:56:18Z') + '2011-02-21T19:56:18.000Z') def test_xmlns_version_matches_request_version(self): self.expect_http(api_version='2010-10-30')