zed
zed copied to clipboard
Fix log timestamps not using local timezone
Get time offset by time crate will fail if there are mutli threads. So call config_builder.set_time_offset_to_local() is useless.
Closes #16397
after:
Release Notes:
- Added/Fixed/Improved ...
Optionally, include screenshots / media showcasing your addition that can be included in the release notes.
Or...
Closes #ISSUE
Release Notes:
- N/A
config_builder.set_time_offset_to_local() uses UtcOffset::current_local_offset() to get local offset, but it will get Err(error::IndeterminateOffset) when there are multi-thead (https://github.com/time-rs/time/issues/293, https://github.com/time-rs/time/issues/296). I have debuged the fn main, I don't why there are 3 threads when main start to execute. So UtcOffset::current_local_offset() will always return Err.
Thanks!