diff options
Diffstat (limited to 'karlgui')
-rw-r--r-- | karlgui/Cargo.toml | 12 | ||||
-rw-r--r-- | karlgui/src/helper.rs | 2 | ||||
-rw-r--r-- | karlgui/src/views/calendar.rs | 4 |
3 files changed, 9 insertions, 9 deletions
diff --git a/karlgui/Cargo.toml b/karlgui/Cargo.toml index 824fbdb..63186f7 100644 --- a/karlgui/Cargo.toml +++ b/karlgui/Cargo.toml @@ -7,13 +7,13 @@ edition = "2021" karlcommon = { path = "../karlcommon" } crossbeam-channel = "0.5.6" -serde_json = "1.0.83" -chrono = "0.4.22" +serde_json = "1.0.89" +chrono = "0.4.23" rand = "0.8.5" -env_logger = "0.9.0" +env_logger = "0.10.0" log = "0.4.17" -eframe = "0.18.0" -egui = "0.18.1" -egui_extras = "0.18.0" +eframe = "0.19.0" +egui = "0.19.0" +egui_extras = "0.19.0" diff --git a/karlgui/src/helper.rs b/karlgui/src/helper.rs index 0192173..4acb9f3 100644 --- a/karlgui/src/helper.rs +++ b/karlgui/src/helper.rs @@ -3,7 +3,7 @@ use egui::{DragValue, Ui}; use karlcommon::Property; pub fn from_timestamp(t: i64) -> NaiveDateTime { - NaiveDateTime::from_timestamp(t, 0) + NaiveDateTime::from_timestamp_opt(t, 0).unwrap() } pub fn format_value(prop: Property, value: i64) -> String { diff --git a/karlgui/src/views/calendar.rs b/karlgui/src/views/calendar.rs index 2eca0cc..b583357 100644 --- a/karlgui/src/views/calendar.rs +++ b/karlgui/src/views/calendar.rs @@ -25,8 +25,8 @@ impl Calendar { pub fn ui(&mut self, ui: &mut Ui, g: &mut Globals) { let start_date = chrono::Utc::now().date_naive() + chrono::Duration::days(self.offset); let end_date = start_date + chrono::Duration::days(7); - let start_dt = start_date.and_hms(0, 0, 0); - let end_dt = end_date.and_hms(0, 0, 0); + let start_dt = start_date.and_hms_opt(0, 0, 0).unwrap(); + let end_dt = end_date.and_hms_opt(0, 0, 0).unwrap(); let task_ids = g.tasks.keys().map(|e| e.to_owned()).collect::<Vec<_>>(); let instances = |