Update s3fs_util.cpp

Fixed local time was incorrectly being applied to IAM and Last-Modified dates.
This commit is contained in:
worpet 2013-12-30 09:35:39 -06:00
parent d9f13dbdcb
commit 33ec3739e2

View File

@ -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)