zed icon indicating copy to clipboard operation
zed copied to clipboard

Fix log timestamps not using local timezone

Open bestgopher opened this issue 1 year ago • 2 comments

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: image

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

bestgopher avatar Aug 17 '24 06:08 bestgopher

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.

bestgopher avatar Aug 17 '24 12:08 bestgopher

Thanks!

ConradIrwin avatar Aug 22 '24 18:08 ConradIrwin