thlorenz / rid

Rust integrated Dart framework providing an easy way to build Flutter apps with Rust.
64 stars 4 forks source link

thread 'main' panicked at 'Could not determine the UTC offset on this system. #62

Open enzotar opened 2 years ago

enzotar commented 2 years ago

Came upon this error while running ./sh/macos

Problem

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', /Users/amir/.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

Resolution Update SimpleLogger to 2.1.0 and in rid-build/src/log.rs, add .with_utc_timestamps()

SimpleLogger::new().with_utc_timestamps()
        .with_level(LevelFilter::Debug)
        .init()
        .unwrap();