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

未关闭
#10,292 1 条评论 0 个 reaction 已指派 2 人 在 GitHub 查看

维护者通常 1 天内回复

@vihar 已经在做这个了。

开始于 2026年11月15日。

  • #10293 来自 @fedshaft —— 未关闭
  • #10420 来自 @avesh-pathak —— 未关闭

评估

这个 Issue 还没有评估数据。

描述

🐛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)

主要语言
TypeScript
星标
63k
派生
6.5k
平均合并
2 天 16 小时
30 天内合并 PR
70

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

makeplane/plane 的其他 Issue

查看 makeplane/plane 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。