modified: src/ui.c

master
ketrptr 2024-12-16 17:35:23 +01:00
parent e5b5fd3b50
commit bcb08c6da9
1 changed files with 4 additions and 2 deletions

View File

@ -19,6 +19,9 @@
#define localtime_r(T, Tm) (localtime_s(Tm, T) ? NULL : Tm)
#endif
#define minutes(n) (60 * n)
#define hours(n) (60 * minutes(n))
#define days(n) (24 * hours(n))
const char *dbName = "db.csv";
int main(void) {
@ -83,8 +86,7 @@ int main(void) {
// }
// create deadline timestamp
lc.tm_hour += (taskdeadline_date * 24);
time_t deadline = mktime(&lc);
time_t deadline = now + days(taskdeadline_date);
Task *newT = newTask(taskname, now, deadline, taskpriority, 0);
if (listT == NULL) {
listT = llistNew(newT, cmpTaskN);