diff --git a/Authors b/Authors index afe7be3f868c..31ced6e8e316 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/api/ec2/apirequest.py b/nova/api/ec2/apirequest.py index 8098832999ce..36223341e2a2 100644 --- a/nova/api/ec2/apirequest.py +++ b/nova/api/ec2/apirequest.py @@ -44,7 +44,7 @@ def _underscore_to_xmlcase(str): def _database_to_isoformat(datetimeobj): """Return a xs:dateTime parsable string from datatime""" - return datetimeobj.strftime("%Y-%m-%dT%H:%M:%SZ") + return datetimeobj.strftime("%Y-%m-%dT%H:%M:%S.%f")[:-3] + 'Z' class APIRequest(object): diff --git a/nova/tests/test_api.py b/nova/tests/test_api.py index 2b46be867498..473e1d5f9a57 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')

AltStyle によって変換されたページ (->オリジナル) /