I am building a Rust app and I am using Simple Logger to log the init of my app. My main.rs looks like this:
use log::info;
use simple_logger::SimpleLogger;
fn main() {
SimpleLogger::new().init().unwrap();
let (event_loop, mut interface) = create_interface();
info!("Game interface created");
the above code is erroring with:
thread 'main' panicked at 'Could not determine the UTC offset on this system. Possible causes are that the time crate does not implement "local_offset_at" on your system, or that you are running in a multi-threaded environment and the time crate is returning "None" from "local_offset_at" to avoid unsafe behaviour. See the time crate's documentation for more information. (https://time-rs.github.io/internal-api/time/index.html#feature-flags): IndeterminateOffset', /home/athul/.cargo/registry/src/github.com-1ecc6299db9ec823/simple_logger-1.16.0/src/lib.rs:409:85
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
I've tried:
- using
try_current_local_offsetwith the time crate - using Chrono
but the error still persists. It's likely that I do not have my time properly initialized for my app. What is the best (and easiest) way to do it?