Function flexi_logger::now_local[][src]

pub fn now_local() -> OffsetDateTime
Expand description

Function used to determine the current timestamp.

Due to the issue of the time crate (see their CHANGELOG) that determining the offset is not safely working on linux, and is not even tried there if the program is multi-threaded, this method retrieves the offset only once and caches it then. The method is called now during the initialization of flexi_logger, so when this is done while the program is single-threaded, we should get the right time offset in the trace output, even on linux.