Closed jb-alvarado closed 2 years ago
Sadly not.
Because getting the current time was the reason for the unsoundness, that led to the decision to replace chrono
with time
, there is no equivalent in the time
-crate. To figure this out we would need to parse timezone files on unix and I have no idea, how this could work on other operating systems. In any way this is out-of-scope for a logging library.
Thank you, for you quick response! I saw to, that now you have set_time_offset_to_local
, but the doc sound not so optimistic :-). You think is save enough, to use this with a fallback when it failed? Like:
let mut config = ConfigBuilder::new();
let config = match config.set_time_offset_to_local() {
Ok(local) => local.build(),
Err(_) => config.build(),
};
Yes, that fallback should work. :+1:
Hi, I saw that in the process of replacing chrono you replace also the function
set_time_to_local
. Is there a equivalent for that? When I setset_time_offset
I'm worry that this will result in wrong time, when in Europe it changes from summer to winter and vis versa.