-
Notifications
You must be signed in to change notification settings - Fork 1.9k
fix(clickhouse-driver): Respect timezone for origin in custom granula… #10110
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
ovr
merged 7 commits into
master
from
CORE-1928-custom-granularity-timezones-not-respected-results-returned-in-utc-instead-of-the-specified-timezone
Nov 3, 2025
Merged
fix(clickhouse-driver): Respect timezone for origin in custom granula… #10110
ovr
merged 7 commits into
master
from
CORE-1928-custom-granularity-timezones-not-respected-results-returned-in-utc-instead-of-the-specified-timezone
Nov 3, 2025
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…rity Signed-off-by: Dmitry Patsura <[email protected]>
7a93b57 to
207b08b
Compare
db8479a to
8892afe
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. 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
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
ovr
commented
Nov 3, 2025
waralexrom
approved these changes
Nov 3, 2025
73aad0e to
8bb04ca
Compare
KSDaemon
approved these changes
Nov 3, 2025
packages/cubejs-schema-compiler/test/integration/mssql/custom-granularities.test.ts
Outdated
Show resolved
Hide resolved
packages/cubejs-schema-compiler/test/integration/mssql/custom-granularities.test.ts
Outdated
Show resolved
Hide resolved
waralexrom
approved these changes
Nov 3, 2025
f138c5c to
b03beb8
Compare
7fd4f87 to
e94bac7
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Problem
When using custom granularities with an
origintimestamp, ClickHouse'sdateBinimplementation 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.