Skip to content
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

feat(hogql): allow timezone overrides #21004

Merged
merged 2 commits into from
Mar 27, 2024
Merged

Conversation

thmsobrmlr
Copy link
Contributor

@thmsobrmlr thmsobrmlr commented Mar 19, 2024

Problem

We didn't allow overriding the timezone in functions like toDateTime.

Changes

This PR allows overriding the timezone like this: toDateTime(timestamp, 'US/Pacific') for all timezone aware functions (toDate, toDateTime, parseDateTime, parseDateTimeBestEffort, now).

How did you test this code?

Added tests

Copy link
Collaborator

@mariusandra mariusandra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@posthog-bot
Copy link
Contributor

This PR hasn't seen activity in a week! Should it be merged, closed, or further worked on? If you want to keep it open, post a comment or remove the stale label – otherwise this will be closed in another week.

@thmsobrmlr thmsobrmlr marked this pull request as ready for review March 27, 2024 10:32
@thmsobrmlr thmsobrmlr enabled auto-merge (squash) March 27, 2024 10:32
@thmsobrmlr thmsobrmlr removed the stale label Mar 27, 2024
@thmsobrmlr thmsobrmlr merged commit 8d55545 into master Mar 27, 2024
130 of 131 checks passed
@thmsobrmlr thmsobrmlr deleted the hogql-timezone-overrides branch March 27, 2024 10:48
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.

3 participants