Skip to content

Conversation

@ovr
Copy link
Member

@ovr ovr commented Nov 3, 2025

Problem

When using custom granularities with an origin timestamp, ClickHouse's dateBin implementation was not respecting time zones properly:

ClickHouse aligns both timestamps internally to the same timezone before computing the difference, causing an unintended offset. As a result, the date difference and the final rounded time are incorrect, and the returned values are effectively in UTC.

@ovr ovr requested a review from a team as a code owner November 3, 2025 13:53
@github-actions github-actions bot added the javascript Pull requests that update Javascript code label Nov 3, 2025
@github-actions github-actions bot added the rust Pull requests that update Rust code label Nov 3, 2025
@ovr ovr force-pushed the CORE-1928-custom-granularity-timezones-not-respected-results-returned-in-utc-instead-of-the-specified-timezone branch from 7a93b57 to 207b08b Compare November 3, 2025 15:16
@ovr ovr force-pushed the CORE-1928-custom-granularity-timezones-not-respected-results-returned-in-utc-instead-of-the-specified-timezone branch from db8479a to 8892afe Compare November 3, 2025 15:33
@codecov
Copy link

codecov bot commented Nov 3, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 78.10%. Comparing base (b0b011e) to head (e94bac7).
⚠️ Report is 3 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master   #10110      +/-   ##
==========================================
- Coverage   78.10%   78.10%   -0.01%     
==========================================
  Files         457      457              
  Lines       90994    90998       +4     
  Branches     3330     3331       +1     
==========================================
+ Hits        71070    71073       +3     
+ Misses      19451    19448       -3     
- Partials      473      477       +4     
Flag Coverage Δ
cube-backend 55.13% <100.00%> (+0.02%) ⬆️
cubesql 83.33% <ø> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@ovr ovr force-pushed the CORE-1928-custom-granularity-timezones-not-respected-results-returned-in-utc-instead-of-the-specified-timezone branch 2 times, most recently from 73aad0e to 8bb04ca Compare November 3, 2025 16:18
@ovr ovr force-pushed the CORE-1928-custom-granularity-timezones-not-respected-results-returned-in-utc-instead-of-the-specified-timezone branch from f138c5c to b03beb8 Compare November 3, 2025 16:27
@ovr ovr force-pushed the CORE-1928-custom-granularity-timezones-not-respected-results-returned-in-utc-instead-of-the-specified-timezone branch from 7fd4f87 to e94bac7 Compare November 3, 2025 17:10
@ovr ovr merged commit 2d1b850 into master Nov 3, 2025
84 of 86 checks passed
@ovr ovr deleted the CORE-1928-custom-granularity-timezones-not-respected-results-returned-in-utc-instead-of-the-specified-timezone branch November 3, 2025 17:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

javascript Pull requests that update Javascript code rust Pull requests that update Rust code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants