aboutsummaryrefslogtreecommitdiff
path: root/src/app
diff options
context:
space:
mode:
authorAkshay <[email protected]>2020-07-21 06:54:42 +0100
committerAkshay <[email protected]>2020-07-21 06:54:42 +0100
commit76a6e78ccbea125ab5b8c06ff254260759d3140c (patch)
tree5b759ebbbdfa8031e6a1c9236e807b2e77c1ca54 /src/app
parent2a3be003015bac9c6a13549029b9fb4595e88384 (diff)
switch to local time over utc time
Diffstat (limited to 'src/app')
-rw-r--r--src/app/impl_self.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/app/impl_self.rs b/src/app/impl_self.rs
index 744f906..2450bff 100644
--- a/src/app/impl_self.rs
+++ b/src/app/impl_self.rs
@@ -118,7 +118,7 @@ impl App {
118 } 118 }
119 119
120 pub fn status(&self) -> StatusLine { 120 pub fn status(&self) -> StatusLine {
121 let today = chrono::Local::now().naive_utc().date(); 121 let today = chrono::Local::now().naive_local().date();
122 let remaining = self.habits.iter().map(|h| h.remaining(today)).sum::<u32>(); 122 let remaining = self.habits.iter().map(|h| h.remaining(today)).sum::<u32>();
123 let total = self.habits.iter().map(|h| h.goal()).sum::<u32>(); 123 let total = self.habits.iter().map(|h| h.goal()).sum::<u32>();
124 let completed = total - remaining; 124 let completed = total - remaining;
@@ -207,7 +207,7 @@ impl App {
207 .iter_mut() 207 .iter_mut()
208 .find(|x| x.name() == name && x.is_auto()); 208 .find(|x| x.name() == name && x.is_auto());
209 if let Some(h) = target_habit { 209 if let Some(h) = target_habit {
210 h.modify(Local::now().naive_utc().date(), event); 210 h.modify(Local::now().naive_local().date(), event);
211 } 211 }
212 }; 212 };
213 match result { 213 match result {