Closed bobbykjack closed 4 years ago
Based on this SO thread, you can try replacing the following line:
return std::chrono::duration_cast<std::chrono::seconds>(std::chrono::high_resolution_clock::now().time_since_epoch()).count(); // duh ..
with
return std::chrono::duration_cast<std::chrono::seconds>(std::chrono::system_clock::now().time_since_epoch()).count(); // duh ..
The hypothesis is that only system_clock
is guaranteed to return Unix time.
If you get the chance to try it, please let me know. Thanks!
Yup, confirmed that fixes it.
Great! Feel free to make a PR
Well, I don't have any access to other platforms, and I'm not really comfortable dealing with any portability issues on this one, so I'll leave it up to you if that's ok! Cheers.
I'm running macOS 10.14.6 and can provide any other details on request.