Bug report: Subscription delivery time shifts by 1 hour after DST change
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 39.9k
- Forks
- 3.4k
- Avg merge
- 7h 27m
- Merged PRs (30d)
- 222
Description
Bug Description
Please describe.
Subscription schedules are stored in UTC and don't adjust for Daylight Saving Time transitions. When DST changes, subscriptions fire 1 hour earlier or later than the user's intended local time.
Expected: Subscriptions should fire at the same wall-clock time year-round (e.g., always 8am CT, regardless of whether CT is currently CDT or CST).
Actual: A subscription which was set for 8am during CDT is now firing at 7am CST
E.g., A user sets a subscription for 8am CT during CDT (UTC-5). The start_date is stored as 13:00 UTC. After DST ends and CT shifts to CST (UTC-6), 13:00 UTC now equals 7am local time, and so the subscription arrives an hour early.
How to reproduce
Expected: Subscriptions should fire at the same wall-clock time year-round (e.g., always 8am CT, regardless of whether CT is currently CDT or CST).
Actual: A subscription which was set for 8am during CDT is now firing at 7am CST
E.g., A user sets a subscription for 8am CT during CDT (UTC-5). The start_date is stored as 13:00 UTC. After DST ends and CT shifts to CST (UTC-6), 13:00 UTC now equals 7am local time, and so the subscription arrives an hour early.
How to reproduce
- Set project timezone to a region that observes DST (e.g., US/Central)
- Create a subscription scheduled for a specific local time (e.g., 8am)
- Wait for a DST transition to occur 📆 👴
- Observe that the subscription now fires 1 hour off from the originally intended local time
Additional context
From: https://posthoghelp.zendesk.com/agent/tickets/43459 (moved to PostHog: https://us.posthog.com/project/2/support/tickets/44944)
Debug info
Session: https://us.posthog.com/project/sTMFPsFhdP1Ssg/replay/019ab87a-76a3-7b65-96ed-94c3b9c84109?t=0
Admin: http://go/adminOrgUS/018fcb66-e8df-0000-8bc3-a7b071baeea1 (project ID 71639)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No file or test is named. Start by tracing the subscription scheduling path and its UTC-to-local timezone handling, then reproduce the issue with a US/Central project across a DST transition. Done means a subscription set for a local wall-clock time continues firing at that time after the offset changes.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100