about summary refs log tree commit diff
diff options
context:
space:
mode:
-rwxr-xr-xCargo.lock7
-rwxr-xr-xCargo.toml2
-rwxr-xr-xsrc/ui/task_details.rs1
-rwxr-xr-xsrc/ui/window.rs4
4 files changed, 11 insertions, 3 deletions
diff --git a/Cargo.lock b/Cargo.lock
index 27f2bd2..66fa5c3 100755
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -132,6 +132,7 @@ dependencies = [
  "libc",
  "num-integer",
  "num-traits",
+ "pure-rust-locales",
  "time",
  "winapi",
 ]
@@ -923,6 +924,12 @@ dependencies = [
 ]
 
 [[package]]
+name = "pure-rust-locales"
+version = "0.5.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b45c49fc4f91f35bae654f85ebb3a44d60ac64f11b3166ffa609def390c732d8"
+
+[[package]]
 name = "quick-xml"
 version = "0.22.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
diff --git a/Cargo.toml b/Cargo.toml
index 7135c7b..bc92550 100755
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -7,7 +7,7 @@ edition = "2018"
 [dependencies]
 gettext-rs = { version = "0.7", features = ["gettext-system"] }
 rusqlite = "0.27.0"
-chrono = "0.4"
+chrono = { version = "0.4", features = ["unstable-locales"] }
 directories = "4.0"
 once_cell = "1.12.0"
 dbus = "0.9.5"
diff --git a/src/ui/task_details.rs b/src/ui/task_details.rs
index b8771ac..685e261 100755
--- a/src/ui/task_details.rs
+++ b/src/ui/task_details.rs
@@ -126,6 +126,7 @@ 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/window.rs b/src/ui/window.rs
index 1371eb1..81f5815 100755
--- a/src/ui/window.rs
+++ b/src/ui/window.rs
@@ -196,7 +196,7 @@ impl FurtheranceWindow {
             .connect_changed(clone!(@weak self as this => move |task_input| {
                 let imp2 = imp::FurtheranceWindow::from_instance(&this);
                 let task_input_text = task_input.text();
-                let split_tags: Vec<&str> = task_input_text.trim().split("#").collect();
+                let split_tags: Vec<&str> = task_input_text.trim().split('#').collect();
                 if split_tags[0].trim().is_empty() {
                     imp2.start_button.set_sensitive(false);
                 } else {
@@ -212,7 +212,7 @@ impl FurtheranceWindow {
                     let mut secs: i32 = 0;
                     let mut mins: i32 = pomodoro_time;
                     let mut hrs: i32 = mins / 60;
-                    mins = mins % 60;
+                    mins %= 60;
 
                     *imp2.running.lock().unwrap() = true;
                     *start_time.borrow_mut() = Local::now();