diff options
author | Konstantin Käfer <mail@kkaefer.com> | 2016-05-13 15:41:22 +0200 |
---|---|---|
committer | Konstantin Käfer <mail@kkaefer.com> | 2016-05-13 17:24:22 +0200 |
commit | cd65a43855f33555eca5f3e3ad5d37661253209f (patch) | |
tree | d83b63f4baeb3672c4909a08b14783c717b74681 /platform/node | |
parent | c1dde52c73061a49d576454a9ab4739e72561ca6 (diff) | |
download | qtlocation-mapboxgl-cd65a43855f33555eca5f3e3ad5d37661253209f.tar.gz |
[core] move from microsecond precision timestamp to integer second precision
Diffstat (limited to 'platform/node')
-rw-r--r-- | platform/node/src/node_request.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/platform/node/src/node_request.cpp b/platform/node/src/node_request.cpp index 50d7628a2b..d1a40a9080 100644 --- a/platform/node/src/node_request.cpp +++ b/platform/node/src/node_request.cpp @@ -79,14 +79,16 @@ NAN_METHOD(NodeRequest::Respond) { if (Nan::Has(res, Nan::New("modified").ToLocalChecked()).FromJust()) { const double modified = Nan::Get(res, Nan::New("modified").ToLocalChecked()).ToLocalChecked()->ToNumber()->Value(); if (!std::isnan(modified)) { - response.modified = mbgl::SystemClock::from_time_t(modified / 1000); + response.modified = mbgl::Timestamp{ mbgl::Seconds( + static_cast<mbgl::Seconds::rep>(modified / 1000)) }; } } if (Nan::Has(res, Nan::New("expires").ToLocalChecked()).FromJust()) { const double expires = Nan::Get(res, Nan::New("expires").ToLocalChecked()).ToLocalChecked()->ToNumber()->Value(); if (!std::isnan(expires)) { - response.expires = mbgl::SystemClock::from_time_t(expires / 1000); + response.expires = mbgl::Timestamp{ mbgl::Seconds( + static_cast<mbgl::Seconds::rep>(expires / 1000)) }; } } |