aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ttt.jai12
1 files changed, 6 insertions, 6 deletions
diff --git a/ttt.jai b/ttt.jai
index b2639d9..9c7f948 100644
--- a/ttt.jai
+++ b/ttt.jai
@@ -434,11 +434,14 @@ move_task :: (db: *Database, source: s64, target: s64) { // TODO Maybe `using db
update_times :: (db: *Database) {
assert(db != null, ASSERT_NOT_NULL, "db");
- if db.active_idx < 0 return;
-
// Get time frame in UTC.
start_time := db.modified_on;
- stop_time := current_time_consensus();
+ stop_time := seconds_to_apollo(to_seconds(current_time_consensus())); // HACK Discard sub-seconds information because Task.times only store seconds. To other workaround would be to use Task.times as Apollo_Time instead of s64 seconds.
+
+ // Keep track of this update.
+ db.modified_on = stop_time;
+
+ if db.active_idx < 0 return;
active_task := *db.tasks[db.active_idx];
start_week_day: s8;
@@ -462,9 +465,6 @@ update_times :: (db: *Database) {
start_time = next_start;
}
-
- // Keep track of this update.
- db.modified_on = stop_time;
}
// Recalculates database totals.