Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dates getting displayed as huge numbers on macos #3

Closed
bobbykjack opened this issue Dec 16, 2019 · 4 comments
Closed

Dates getting displayed as huge numbers on macos #3

bobbykjack opened this issue Dec 16, 2019 · 4 comments
Labels
bug Something isn't working

Comments

@bobbykjack
Copy link

hnterm

I'm running macOS 10.14.6 and can provide any other details on request.

@ggerganov
Copy link
Owner

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!

@ggerganov ggerganov added the bug Something isn't working label Dec 16, 2019
@bobbykjack
Copy link
Author

Yup, confirmed that fixes it.

grab 2019-12-16 at 21 42 59

@ggerganov
Copy link
Owner

Great! Feel free to make a PR

@bobbykjack
Copy link
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants