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

Aperta
#10,292 1 commento 0 reazioni 2 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

@vihar ci sta già lavorando.

Dal 15/11/2026.

  • #10293 di @fedshaft — aperta
  • #10420 di @avesh-pathak — aperta

Valutazione

Questa issue non è ancora stata valutata.

Descrizione

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

Lingua principale
TypeScript
Stelle
63k
Fork
6.5k
Merge medio
2g 16h
PR unite (30g)
70

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di makeplane/plane

Tutte le issue di makeplane/plane

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.