summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErik Winter <ik@erikwinter.nl>2021-05-15 15:16:13 +0200
committerErik Winter <ik@erikwinter.nl>2021-05-15 15:16:13 +0200
commit545657edf17e9ca24470cfdc9f680b1788832fa5 (patch)
tree6b4c5b6a511569b29e31bd8ad4cd02a8f01535ee
parent2bfe631767bef7b66ffcfd14df6e0497e5b6be47 (diff)
fixed today bug in recur
-rw-r--r--cmd/daemon/service.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/cmd/daemon/service.go b/cmd/daemon/service.go
index 5cd968a..580f79a 100644
--- a/cmd/daemon/service.go
+++ b/cmd/daemon/service.go
@@ -69,13 +69,13 @@ func Run(inboxProc *process.Inbox, recurProc *process.Recur, logger log.Logger)
}
case <-recurTicker.C:
year, month, day := time.Now().Date()
- newToday := task.NewDate(year, int(month), day)
- if oldToday.Equal(newToday) {
+ task.Today = task.NewDate(year, int(month), day)
+ if oldToday.Equal(task.Today) {
continue
}
- oldToday = newToday
+ oldToday = task.NewDate(year, int(month), day)
result, err := recurProc.Process()
if err != nil {
logger.WithErr(err).Error("failed generating recurring tasks")