Fix reconciler test to calc lastmodified as UTC

Swift reconciler calculates the last-modified date as UTC but
current test calculates it as local time zone. It triggers unit
test failure in non-UTC environment.

This patch fixes the test to calculate the last-modified as UTC
as well.

Change-Id: Ia0053f350daf2cb8c61ac01a933924b6e4b0cb37
Closes-Bug: #1526588
This commit is contained in:
Kota Tsuyuzaki 2015-12-15 18:55:41 -08:00 committed by Janonymous
parent ef8ae0a8ce
commit b68311db95

View File

@ -36,7 +36,7 @@ from test.unit.common.middleware.helpers import FakeSwift
def timestamp_to_last_modified(timestamp):
return datetime.fromtimestamp(
return datetime.utcfromtimestamp(
float(Timestamp(timestamp))).strftime('%Y-%m-%dT%H:%M:%S.%f')