From 8016c2aabb20aa820eff09f339445a5524582c3d Mon Sep 17 00:00:00 2001 From: dam Date: Thu, 6 Apr 2023 15:58:42 +0100 Subject: Fixed bug: correct timezone is used on draw_tui. --- ttt.jai | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'ttt.jai') diff --git a/ttt.jai b/ttt.jai index d16efce..0955d09 100644 --- a/ttt.jai +++ b/ttt.jai @@ -1061,7 +1061,7 @@ draw_tui :: (db: *Database, layout: *Layout) { active_task := get_active_task(db); selected_task := get_selected_task(db); now_utc := current_time_consensus(); - now_week_day := to_calendar(now_utc).day_of_week_starting_at_0; + now_week_day := to_calendar(now_utc, .LOCAL).day_of_week_starting_at_0; // Reset theme and clear screen. attrset(A_NORMAL); @@ -1101,7 +1101,7 @@ draw_tui :: (db: *Database, layout: *Layout) { idx := adjust_first_day_of_week[it]; x += 1; - // Apply theme. FIXME Not working (tested at 00:40 UTC+1 and showed one day earlier. + // Apply theme. if (idx == now_week_day && active_task != null) { attron(COLOR_PAIR(xx Styles.ACTIVE) | A_BOLD); } -- cgit v1.2.3