From 33ec3739e289a40883b9f687af037bce90582228 Mon Sep 17 00:00:00 2001 From: worpet Date: Mon, 30 Dec 2013 09:35:39 -0600 Subject: [PATCH] Update s3fs_util.cpp Fixed local time was incorrectly being applied to IAM and Last-Modified dates. --- src/s3fs_util.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/s3fs_util.cpp b/src/s3fs_util.cpp index 58b4e2e..04d6f0d 100644 --- a/src/s3fs_util.cpp +++ b/src/s3fs_util.cpp @@ -752,7 +752,7 @@ time_t cvtIAMExpireStringToTime(const char* s) } memset(&tm, 0, sizeof(struct tm)); strptime(s, "%Y-%m-%dT%H:%M:%S", &tm); - return mktime(&tm); // GMT + return timegm(&tm); // GMT } time_t get_lastmodified(const char* s) @@ -763,7 +763,7 @@ time_t get_lastmodified(const char* s) } memset(&tm, 0, sizeof(struct tm)); strptime(s, "%a, %d %b %Y %H:%M:%S %Z", &tm); - return mktime(&tm); // GMT + return timegm(&tm); // GMT } time_t get_lastmodified(headers_t& meta)