Interviews: an unknown time zone, a floating time or an all-day event is read as UTC and moves the interview #24
Labels
No labels
bug
documentation
enhancement
performance
security
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
Postulo/postulo-dav#24
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Found on 2026-09-29 in a read-only review of postulo-dav at
97abc9779, reading the iCalendar time parser and running it on sample events.parse_momentturns DTSTART and DTEND into UTC, and three kinds of value come out wrong. A TZID thatzoneinfocannot load (a Windows zone name such asW. Europe Standard Time, or a client's own VTIMEZONE id) silently becomes UTC, and the VTIMEZONE in the same document is never read. A floating time, which RFC 5545 §3.3.5 defines as local time, is taken as UTC. A date-only DTSTART becomes midnight UTC.apply_eventhands the result straight toreschedule_interview, which moves the interview, writes "moved from … to …" on the timeline and moves the reminder.src/postulo_dav/text.py:286-303(parse_moment:zone = dt.UTC…except Exception: zone = dt.UTC, andreturn dt.datetime(y, mo, d, tzinfo=dt.UTC)for a date);src/postulo_dav/sync.py:194-197(apply_eventcallsreschedule_interviewwhenever both ends parsed).DTSTART;TZID=W. Europe Standard Time:20260910T140000. The parser returns 14:00 UTC (checked by runningtext_to_events), so a 14:00 Berlin interview is moved to 16:00 Berlin time here, with a timeline entry and a moved reminder.DTSTART:20260910T140000(floating) also gives 14:00 UTC. Turning the event into an all-day event on the phone reschedules the interview to 00:00 UTC for 24 hours. The existing testtest_an_event_is_read_with_its_zone_and_recurrence_noticedasserts the date-only result as intended.windowsZonestable) and then the VTIMEZONE in the same document; if none resolves, returnNoneso the pull does not reschedule, and add a report note naming the event. Do not reschedule from a floating or date-only DTSTART; report it as a note instead.Done when
tests/test_dav.pythat pull an event with an unresolvable TZID, a floating DTSTART and a date-only DTSTART, and assert the interview's time is unchanged and the report carries a note; and a parser test that a Windows zone name resolves to the right UTC instant.Fixed by pull request #35, merged as
fb8bbd7ae.