Convert DateTime<Local> to NaiveDateTime

Use of DateTime<Local> can lead to excessive inspection of the system
timezone.

Instead, propagate only a timezone-compensated NaiveDateTime throughout
the widgets.
This commit is contained in:
Kenny Levinsen
2020-04-22 00:52:08 +02:00
parent c380d20794
commit 300711affe
7 changed files with 35 additions and 29 deletions
+1 -1
View File
@@ -220,7 +220,7 @@ impl App {
};
let inner = self.inner.lock().unwrap();
let time = Local::now();
let time = Local::now().naive_local();
if !inner.visible
|| inner.shell_surfaces.len() != *inner.configured_surfaces.lock().unwrap()