[bug]: cycle ending on a daylight saving transition day ends on the next day and blocks the following cycle

Đang mở
#10,292 1 bình luận 0 reaction 2 người được giao Xem trên GitHub

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

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

Từ ngày 15/11/2026.

  • #10293 của @fedshaft — đang mở
  • #10420 của @avesh-pathak — đang mở

Đánh giá

Issue này chưa được đánh giá.

Mô tả

🐛bug plane
Is there an existing issue for this?
  • I have searched the existing issues
Current behavior

A cycle that ends on the day the clocks go forward is stored as ending at 00:59 on the following day, in the project's timezone.

Two things follow:

  • The cycle API returns the next day as end_date (for example 2027-03-15T00:59:00-04:00 for a cycle ending 2027-03-14 in America/New_York).
  • cycles/date-check/ reports an overlap for a cycle starting the next day, so back-to-back cycles cannot be created across the transition.

On the day the clocks go back, the cycle ends at 22:59 instead of 23:59.

Expected: the cycle ends at 23:59 on the chosen day, and a cycle starting the next day is accepted.

Cause: convert_to_utc in apps/api/plane/utils/timezone_converter.py adds timedelta(hours=23, minutes=59) to local midnight. pytz keeps the midnight UTC offset after that addition, which is wrong when the offset changes during the day.

I have a fix with tests ready and can open a PR.

Steps to reproduce
  1. Set a project's timezone to America/New_York (any zone with DST works).
  2. Create a cycle from 2027-03-01 to 2027-03-14. Clocks go forward on 14 March.
  3. Check a new cycle from 2027-03-15 to 2027-03-28 (POST cycles/date-check/).

Result: {"status": false, "error": "You have a cycle already on the given dates..."}

Reproduced through the app API with the docker-compose-test.yml test stack on preview at 290383d7.

Environment

Production

Browser

None

Edition

Community

Version

preview branch at 290383d7 (latest tag: v1.5.0-rc2)

Ngôn ngữ chính
TypeScript
Star
63k
Fork
6.5k
Merge trung bình
2 ngày 16 giờ
Pull request đã merge (30 ngày)
70

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 makeplane/plane

Tất cả issue của makeplane/plane

Issue tương tự

Thêm issue về TypeScript

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.