Objects built from arguments have a TZID but no VTIMEZONE

Đang mở
#849 14 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

@ivenos đang làm issue này rồi.

Từ ngày 7/11/2026.

  • #852 của @ivenos — đang mở

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
45/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
python
Lĩnh vực
backend-api-design

Hướng nghiên cứu

Start by reading create_ical() and complete(rrule_mode="thisandfuture"), the two entry points named in the issue, and inspect how timezone components and recurrence rules are handled. Check the existing tests for add_event, add_todo and completion behavior, then run them with a non-UTC timezone and a calendar containing VTIMEZONE. Done means the timezone data is included and read correctly across the year, while completion works when VTIMEZONE appears before or after the task.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

add_event(dtstart=...) or add_todo(due=...) with a time zone other than UTC writes DTSTART;TZID=Europe/Prague:... without a VTIMEZONE, which RFC 5545 section 3.6.5 requires. Home Assistant creates its events this way, and a user there sees them shifted by the UTC offset in Synology Calendar (https://github.com/home-assistant/core/issues/172990).

I have a fix that adds the missing VTIMEZONE in create_ical(), built with icalendar's Timezone.from_tzid(). One catch: icalendar writes the transitions as one RDATE list and vobject 0.9.9 only reads the first value, so vobject_instance would be an hour off for half of the year. The fix writes one RDATE per line. It also has to touch complete(rrule_mode="thisandfuture"), which takes the first component as the task: it fails with KeyError: 'RRULE' when a VTIMEZONE comes first, as in most tasks from other clients, and marks a VTIMEZONE after the task as completed instead.

The fix was written with Claude and tested against Radicale, Xandikos, Baikal, Nextcloud and SOGo. OK to send it as a PR?

Ngôn ngữ chính
Python
Star
412
Fork
113
Merge trung bình
9 giờ 21 phút
Pull request đã merge (30 ngày)
77

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của python-caldav/caldav

Tất cả issue của python-caldav/caldav

Issue tương tự

Thêm issue về Python

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.