We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3a4acc2 commit 66a3634Copy full SHA for 66a3634
1 file changed
src/widgets/message_row.rs
@@ -2,7 +2,7 @@ use std::io::Read;
2
3
use adw::prelude::*;
4
use adw::subclass::prelude::*;
5
-use chrono::NaiveDateTime;
+use chrono::{Local, TimeZone};
6
use gtk::{gdk, gio, glib};
7
use ntfy_daemon::models;
8
use tracing::error;
@@ -50,7 +50,9 @@ impl MessageRow {
50
51
let time = gtk::Label::builder()
52
.label(
53
- &NaiveDateTime::from_timestamp_opt(msg.time as i64, 0)
+ &Local
54
+ .timestamp_opt(msg.time as i64, 0)
55
+ .earliest()
56
.map(|time| time.format("%Y-%m-%d %H:%M:%S").to_string())
57
.unwrap_or_default(),
58
)
0 commit comments