diff options
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)) }; } } |