mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-10-19 05:26:47 +00:00
9cb74e22f6
Dawarich's `duration` is minutes. It writes the column as `duration_minutes = ((ended_at - started_at) / 60).to_i` in `app/services/visits/create.rb` and serialises it straight through; the merge service rounds the same way. TREK read it as seconds and divided by sixty again, so an eighteen-minute stop reached the suggestion panel as "0 min" and an afternoon somewhere as "2 min". Found by connecting a real Dawarich 1.14.5 and comparing: a visit spanning 11:00:00 to 11:18:45 reports `duration: 18`. The span between the two timestamps is what the panel uses now. It agrees with the arrival and departure shown beside it and it survives whatever unit a future Dawarich picks; the reported figure only stands in when `ended_at` could not be parsed, and is read as minutes there too.