Merge "replace deprecated iso8601_from_timestamp"

This commit is contained in:
Jenkins 2016-01-19 13:37:08 +00:00 committed by Gerrit Code Review
commit 0dc7d4c434

View File

@ -16,7 +16,7 @@
# License for the specific language governing permissions and limitations
# under the License.
from oslo_utils import timeutils
from datetime import datetime
import six.moves.urllib.parse as urlparse
import swiftclient
@ -164,7 +164,7 @@ def swift_get_container(request, container_name, with_data=True):
parameters = urlparse.quote(container_name.encode('utf8'))
public_url = swift_endpoint + '/' + parameters
ts_float = float(headers.get('x-timestamp'))
timestamp = timeutils.iso8601_from_timestamp(ts_float)
timestamp = datetime.utcfromtimestamp(ts_float).isoformat()
except Exception:
pass
container_info = {
@ -342,7 +342,7 @@ def swift_get_object(request, container_name, object_name, with_data=True,
timestamp = None
try:
ts_float = float(headers.get('x-timestamp'))
timestamp = timeutils.iso8601_from_timestamp(ts_float)
timestamp = datetime.utcfromtimestamp(ts_float).isoformat()
except Exception:
pass
obj_info = {