diff options
| author | dam <dam@gudinoff> | 2023-04-21 00:04:51 +0100 |
|---|---|---|
| committer | dam <dam@gudinoff> | 2023-04-21 00:04:51 +0100 |
| commit | 1d0c89ead1dc18ade2051e80b194b9de290106d5 (patch) | |
| tree | ecf96ebb7bc87d3f84c0d5ebb392b76ee5fb1d21 /ttt.jai | |
| parent | 804dd0a008b9e3ecaecae217cbbd18c7d6d5a502 (diff) | |
| download | task-time-tracker-1d0c89ead1dc18ade2051e80b194b9de290106d5.tar.zst task-time-tracker-1d0c89ead1dc18ade2051e80b194b9de290106d5.zip | |
Fixed bugs on update_times.
Diffstat (limited to 'ttt.jai')
| -rw-r--r-- | ttt.jai | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -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. |
