-
Notifications
You must be signed in to change notification settings - Fork 53
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
flexi_logger 0.19.6 has utc time #99
Comments
0.19.6 switched form chrono to the current version of time, due to an unhandled CVE (see #97). I was hoping that this change would not impact users. |
But I can not handle why I have utc time instead of local.. |
|
linux mint |
So in your environment, will I'm asking because |
Have asked a question here also:
True, that is why I have utc time I do not know why, but 0.19.5 version with chrono had local time |
Would you please try out if their |
Yes, using Looks like So reading changelog https:/emabee/flexi_logger/blob/master/CHANGELOG.md#0196---2021-10-26 But just let me know which crate you'll use in flexi_logger in future releases? time or chrono? |
Thanks for checking. I could (1) try factoring out the time vs chrono use, and allow choosing between them via a feature switch. Or we could (2) hope that the fix for |
Just want to say that features in crates does not have to be "mutually exclusive" I mean that adding feature |
Maybe it will be better solution to give choise UTC or "local time on your own risk" not sure And time will show which crate time or chrono is more maintained and actual |
I published 0.20.0 now, which uses the new time 0.3.5, which should allow using local time in single-threaded programs. |
Please let me know if this works for you. |
Everything works correct in 0.20.0 |
Update: time is not local if not set |
That's too bad - and not in line with what |
For some additional information, see time-rs/time#380. I could add an optional feature to use chrono for determining the offset. This brings back the original situation, where, if I got it right, the application must refrain from modifying the environment in concurrent threads. |
The time crate will never return UTC as the local offset if it can't determine it; it'll return the error value. |
That's the right thing to do, definitely. I just hope that it will be possible soon to determine the local offset in a safe manner on all important platforms. |
Likewise! The primary thing that isn't implemented is a way to determine the number of threads on Mac. Windows works unconditionally and Linux works when single-threaded. Other platforms are, of course, less common. I'm open to implementations, though. |
This was mentioned earlier in this issue, but what about introducing option to always use UTC with no offset? I kinda always wanted that feature regardless. |
hi @emabee it looks like latest release of |
Thanks for triggering; with version 0.22.3 I updated the dependency to time to version 0.3.7. |
flexi_logger 0.19.6 has utc time
flexi_logger 0.19.5 had local time
Maybe it is not about flexi_logger crate. But
chrono
andtime
onesBut how to switch back to local?
By the way trying to do
UtcOffset::current_local_offset().unwrap();
Cause panic
thread 'main' panicked at 'called Result::unwrap() on an Err value: IndeterminateOffset', src/main.rs:264:58
The text was updated successfully, but these errors were encountered: