diff options
Diffstat (limited to 'src/app')
-rw-r--r-- | src/app/impl_self.rs | 4 |
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 { |