summaryrefslogtreecommitdiff
path: root/platform/default/http_file_source.cpp
diff options
context:
space:
mode:
authorKonstantin Käfer <mail@kkaefer.com>2016-05-13 15:41:22 +0200
committerKonstantin Käfer <mail@kkaefer.com>2016-05-13 17:24:22 +0200
commitcd65a43855f33555eca5f3e3ad5d37661253209f (patch)
treed83b63f4baeb3672c4909a08b14783c717b74681 /platform/default/http_file_source.cpp
parentc1dde52c73061a49d576454a9ab4739e72561ca6 (diff)
downloadqtlocation-mapboxgl-cd65a43855f33555eca5f3e3ad5d37661253209f.tar.gz
[core] move from microsecond precision timestamp to integer second precision
Diffstat (limited to 'platform/default/http_file_source.cpp')
-rw-r--r--platform/default/http_file_source.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/platform/default/http_file_source.cpp b/platform/default/http_file_source.cpp
index 3250a77c80..e83ecfbfc9 100644
--- a/platform/default/http_file_source.cpp
+++ b/platform/default/http_file_source.cpp
@@ -316,7 +316,7 @@ size_t HTTPRequest::headerCallback(char *const buffer, const size_t size, const
// Always overwrite the modification date; We might already have a value here from the
// Date header, but this one is more accurate.
const std::string value { buffer + begin, length - begin - 2 }; // remove \r\n
- baton->response->modified = SystemClock::from_time_t(curl_getdate(value.c_str(), nullptr));
+ baton->response->modified = Timestamp{ Seconds(curl_getdate(value.c_str(), nullptr)) };
} else if ((begin = headerMatches("etag: ", buffer, length)) != std::string::npos) {
baton->response->etag = std::string(buffer + begin, length - begin - 2); // remove \r\n
} else if ((begin = headerMatches("cache-control: ", buffer, length)) != std::string::npos) {
@@ -324,7 +324,7 @@ size_t HTTPRequest::headerCallback(char *const buffer, const size_t size, const
baton->response->expires = http::CacheControl::parse(value.c_str()).toTimePoint();
} else if ((begin = headerMatches("expires: ", buffer, length)) != std::string::npos) {
const std::string value { buffer + begin, length - begin - 2 }; // remove \r\n
- baton->response->expires = SystemClock::from_time_t(curl_getdate(value.c_str(), nullptr));
+ baton->response->expires = Timestamp{ Seconds(curl_getdate(value.c_str(), nullptr)) };
}
return length;