Skip to content

fix: use toDate instead of toDateTime for cohort event_date comparison#201

Merged
ayushjhanwar-png merged 1 commit intomainfrom
fix/cohort-timezone-todate
Mar 12, 2026
Merged

fix: use toDate instead of toDateTime for cohort event_date comparison#201
ayushjhanwar-png merged 1 commit intomainfrom
fix/cohort-timezone-todate

Conversation

@ayushjhanwar-png
Copy link
Copy Markdown

toDateTime is affected by session_timezone, shifting dates by the timezone offset. This causes cohort membership queries against the event_date (Date type) column to return 0 rows for narrow date ranges. toDate is timezone-independent and correctly matches Date columns.

toDateTime is affected by session_timezone, shifting dates by the
timezone offset. This causes cohort membership queries against the
event_date (Date type) column to return 0 rows for narrow date ranges.
toDate is timezone-independent and correctly matches Date columns.
@ayushjhanwar-png ayushjhanwar-png merged commit 9a87c41 into main Mar 12, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants