d4r1us-drk / clido

A powerful CLI todo list & project manager crafted in Go, designed to keep your tasks and projects organized and accessible right from the terminal
GNU General Public License v3.0
6 stars 1 forks source link

Tasks are incorrectly set to past due #6

Closed d4r1us-drk closed 1 month ago

d4r1us-drk commented 1 month ago

Tasks are being incorrectly marked as "past due" even though the current time has not yet reached the due time of the task.

image

In the example shown, the first task ("Sample Task") has a due date of 2024-08-12 14:00, but the current time is 2024-08-12 10:06:14 AM. Despite the fact that the task is not yet due (there are still almost four hours remaining), it is marked as "past due" (yes). There's a certain time frame in which the task isn't marked as past due, given the second task "Another task", which is set to a month after. This suggests that there might be an issue with how the program is calculating the "past due" status.

Tested in current main branch and PR #5

d4r1us-drk commented 1 month ago

This line: if dueDate.Before(time.Now()) { in ColoredPastDue function is most likely the cause of the bug.

d4r1us-drk commented 1 month ago

Fixed by commit 20de811e0545a10a171ebdcdbcf023c9745f1477