diff options
-rw-r--r-- | src-tauri/src/main.rs | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src-tauri/src/main.rs b/src-tauri/src/main.rs index 5bb2103..4be2da2 100644 --- a/src-tauri/src/main.rs +++ b/src-tauri/src/main.rs @@ -151,11 +151,13 @@ impl Dhcpv6Status { impl From<Dhcpv6Lease> for Dhcpv6Status { fn from(lease: Dhcpv6Lease) -> Self { let validity = if lease.is_valid() { "✅" } else { "❌" }; - let localnow = Local::now(); - let ts = DateTime::<Local>::from(lease.timestamp); Self { - timestamp: format!("{} {}", validity, ts.format("%d.%m.%Y %H:%M:%S UTC%Z")), + timestamp: format!( + "{} {}", + validity, + DateTime::<Local>::from(lease.timestamp).format("%d.%m.%Y %H:%M:%S UTC%Z") + ), srvaddr: if lease.server == SocketAddr::V6(SocketAddrV6::new(Ipv6Addr::UNSPECIFIED, 0, 0, 0)) { |