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

DatumToHLC truncates timestamp #84605

Closed
ecwall opened this issue Jul 18, 2022 · 0 comments · Fixed by #84613
Closed

DatumToHLC truncates timestamp #84605

ecwall opened this issue Jul 18, 2022 · 0 comments · Fixed by #84613
Assignees
Labels
C-bug Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior. T-sql-foundations SQL Foundations Team (formerly SQL Schema + SQL Sessions)

Comments

@ecwall
Copy link
Contributor

ecwall commented Jul 18, 2022

AS OF SYSTEM TIME is parsing string input as timestamp instead of timestamptz so the time zone is being truncated.

Example:
AS OF SYSTEM TIME '2022-07-18 09:51:23.891433-04:00'
is treated as
AS OF SYSTEM TIME '2022-07-18 09:51:23.891433'
instead of
AS OF SYSTEM TIME '2022-07-18 13:51:23.891433'

Happening in master as of 116c5aae8c319a3cdb23e19adadf62b765e66f12.

Jira issue: CRDB-17761

Epic CRDB-14049

@ecwall ecwall added C-bug Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior. T-sql-foundations SQL Foundations Team (formerly SQL Schema + SQL Sessions) labels Jul 18, 2022
@ecwall ecwall self-assigned this Jul 18, 2022
craig bot pushed a commit that referenced this issue Jul 19, 2022
84613: DatumToHLC truncates timestamp r=ajwerner a=ecwall

fixes #84605

Release note (sql): `AS OF SYSTEM TIME` now takes the time zone
into account when converting to UTC.
For example:
'2022-01-01 08:00:00-04:00'
is treated the same as
'2022-01-01 12:00:00'
instead of
'2022-01-01 08:00:00'

Co-authored-by: Evan Wall <[email protected]>
@craig craig bot closed this as completed in dcdcc2a Jul 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior. T-sql-foundations SQL Foundations Team (formerly SQL Schema + SQL Sessions)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant