diff --git a/bridges/relays/utils/src/initialize.rs b/bridges/relays/utils/src/initialize.rs index c6c395d18e02..6b0efb49e480 100644 --- a/bridges/relays/utils/src/initialize.rs +++ b/bridges/relays/utils/src/initialize.rs @@ -30,7 +30,9 @@ pub fn initialize_relay() { builder.parse_filters(&filters); builder.format(move |buf, record| { writeln!(buf, "{}", { - let timestamp = time::OffsetDateTime::now_local().format("%Y-%m-%d %H:%M:%S %z"); + let timestamp = time::OffsetDateTime::try_now_local() + .unwrap_or_else(|_| time::OffsetDateTime::now_utc()) + .format("%Y-%m-%d %H:%M:%S %z"); if cfg!(windows) { format!("{} {} {} {}", timestamp, record.level(), record.target(), record.args()) } else {