fix: use event TZID for UNTIL date conversion

Add a `tz` field to `rem` to carry the event's DTSTART timezone, and
introduce `timedesc_of_utc_or_timestamp_tz` to convert UNTIL timestamps
in that timezone instead of the process locale. This makes UNTIL
comparisons locale-independent for events with a known TZID.
This commit is contained in:
2026-05-18 00:17:04 +02:00
parent 425ce06816
commit 1372d330ff
3 changed files with 24 additions and 4 deletions

View File

@@ -202,7 +202,14 @@ let collect_start_end_duration rem ev : (Remind.rem, error) result =
end)
| `Datetime datetime -> begin
let start_td = Utils.timedesc_of_timestamp datetime in
let rem = { rem with Remind.date = Timedesc.date start_td; Remind.time = Some (Timedesc.time start_td) } in
let rem =
{
rem with
Remind.date = Timedesc.date start_td;
Remind.time = Some (Timedesc.time start_td);
Remind.tz = Some (Timedesc.tz start_td);
}
in
match ev.dtend_or_duration with
| None -> Ok rem