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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user