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

Call to time::OffsetDateTime::now_local() panics #19

Open
bugeats opened this issue Sep 14, 2022 · 2 comments
Open

Call to time::OffsetDateTime::now_local() panics #19

bugeats opened this issue Sep 14, 2022 · 2 comments

Comments

@bugeats
Copy link

bugeats commented Sep 14, 2022

I went to try loggy and hit a snag when this line panics in my project. Don't know why.

@orenbenkiki
Copy link
Owner

  • Can you say what the exact panic was?

  • Does the problem persist if you install the latest development version from github?

  • I assume the panic goes away if you set show_time = false?

The time API has changed under my feet at least once and I've been suspicious of it ever since...

@orenbenkiki
Copy link
Owner

It seems the time package is fussy and returns None in some edge cases regarding the time zone.

I have switched the latest loggy version (0.5.3) to use chrono package that works around this somehow, so things "should" work now.

However, the latest chrono 0.4.23 still uses an old version of time (0.1.45), which is subject to the issue inn https://rustsec.org/advisories/RUSTSEC-2020-0071 - e.g., cargo audit will complain about it.

The full solution will be to use chrono 0.5 - whenever that is released. I'm keeping this issue as open until then.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants