Skip to content

Commit

Permalink
Replace deprecated timestamp call (closes #35)
Browse files Browse the repository at this point in the history
  • Loading branch information
int08h committed Feb 13, 2024
1 parent 77e77b5 commit 2b1ebf4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/bin/roughenough-client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -482,10 +482,10 @@ fn main() {
let verify_str = if verified { "Yes" } else { "No" };

let out = if use_utc {
let ts = Utc.timestamp(seconds as i64, nsecs as u32);
let ts = Utc.timestamp_opt(seconds as i64, nsecs as u32).unwrap();
ts.format(time_format).to_string()
} else {
let ts = Local.timestamp(seconds as i64, nsecs as u32);
let ts = Local.timestamp_opt(seconds as i64, nsecs as u32).unwrap();
ts.format(time_format).to_string()
};

Expand Down

0 comments on commit 2b1ebf4

Please sign in to comment.