DEV Community

Discussion on: Rust: Actix-web and Daily Logging

Collapse
 
behainguyen profile image
Be Hai Nguyen

Note, the following also raises IndeterminateOffset error:

    let now_local = time::OffsetDateTime::now_local();
    let now_offset = now_local.unwrap();
    let timer = OffsetTime::new(
        now_offset.offset(),
        format_description!("[year]-[month]-[day]-[hour]:[minute]:[second]"),
    );
Enter fullscreen mode Exit fullscreen mode

now_local is in error.