diff options
author | Ricky Kresslein <rk@lakoliu.com> | 2022-06-16 11:51:18 +0300 |
---|---|---|
committer | Ricky Kresslein <rk@lakoliu.com> | 2022-06-16 11:51:18 +0300 |
commit | fdbaec6f822b4e7cdbdf63aabceb4d92b6a12326 (patch) | |
tree | 264b1bcc5f6c2e3c3b69a20167a62eb1b24ef9e5 /src/ui | |
parent | 174bfdc1111fb480b441cec8be5746d087e8a86e (diff) | |
download | Furtherance-fdbaec6f822b4e7cdbdf63aabceb4d92b6a12326.tar.zst |
Fix date bug
Diffstat (limited to 'src/ui')
-rwxr-xr-x | src/ui/task_details.rs | 1 | ||||
-rwxr-xr-x | src/ui/tasks_page.rs | 5 |
2 files changed, 5 insertions, 1 deletions
diff --git a/src/ui/task_details.rs b/src/ui/task_details.rs index 685e261..b8771ac 100755 --- a/src/ui/task_details.rs +++ b/src/ui/task_details.rs @@ -126,7 +126,6 @@ impl FurTaskDetails { task_box.set_homogeneous(true); let start_time = DateTime::parse_from_rfc3339(&task.start_time).unwrap(); - Local.from_local_datetime(&start_time).unwrap(); let mut start_time_str = start_time.format("%H:%M:%S").to_string(); if !settings_manager::get_bool("show-seconds") { start_time_str = start_time.format("%H:%M").to_string(); diff --git a/src/ui/tasks_page.rs b/src/ui/tasks_page.rs index 911b005..bdee606 100755 --- a/src/ui/tasks_page.rs +++ b/src/ui/tasks_page.rs @@ -20,6 +20,7 @@ use chrono::{DateTime, Duration, Local}; use gettextrs::*; use gtk::subclass::prelude::*; use gtk::{glib, prelude::*}; +use libc_strftime::{epoch, strftime_local}; use crate::database::{self, SortOrder, TaskSort}; use crate::settings_manager; @@ -87,6 +88,10 @@ impl FurTasksPage { pub fn build_task_list(&self) { let imp = imp::FurTasksPage::from_instance(&self); + let now = epoch(); // most likely a u64 + let local = strftime_local("%h %e", now); + println!("On est: {}", local); + let tasks_list = database::retrieve(TaskSort::StartTime, SortOrder::Descending).unwrap(); let mut uniq_date_list: Vec<String> = Vec::new(); |