Skip to content

Commit

Permalink
Fix cargo-deny. (#522)
Browse files Browse the repository at this point in the history
* Fix cargo-deny.

* Update time crate.

* Fix time issues.
  • Loading branch information
tomusdrw authored and bkchr committed Apr 10, 2024
1 parent e91cab6 commit 667f26b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion bridges/relays/utils/src/initialize.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 667f26b

Please sign in to comment.