-
Notifications
You must be signed in to change notification settings - Fork 332
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: support set timezone in db #2992
feat: support set timezone in db #2992
Conversation
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## develop #2992 +/- ##
===========================================
- Coverage 85.87% 85.19% -0.68%
===========================================
Files 780 783 +3
Lines 126184 126656 +472
===========================================
- Hits 108356 107909 -447
- Misses 17828 18747 +919 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think timezone
is better than time_zone
. And it's a standard term. So can we rename all these funcitons, variables from time_zone
to timezone
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
Maybe also add some cases use time zone other than GMT and Shanghai?
|
In Chrono API, it use |
But most of word used in our codebase is |
Yes, let's do a refactor. It looks like not so much!
|
Do we need to process these convertions? greptimedb/src/datatypes/src/value.rs Line 390 in 1641fd5
Attach the timezone to the scalar value of datafusion. |
According to my observation, these case are used in calculation(all timestamp are convert to |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
I hereby agree to the terms of the GreptimeDB CLA
What's changed and what's your intention?
support set timezone in db
Please explain IN DETAIL what the changes are in this PR and why they are needed:
default_time_zone
as a option instandalone
/frontend
, enable user config system time zone, default system time zone isUTC
QueryContext
, when a new session build, the system time zone will be default user time zone, user can change time zone bySET time_zone = 'UTC';
Checklist
Refer to a related PR or issue link (optional)
#2907
#2893