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

Incorrect value returned by localtime #3846

Closed
martint opened this issue May 25, 2020 · 1 comment · Fixed by #3849
Closed

Incorrect value returned by localtime #3846

martint opened this issue May 25, 2020 · 1 comment · Fixed by #3849
Labels
bug Something isn't working correctness
Milestone

Comments

@martint
Copy link
Member

martint commented May 25, 2020

presto> select localtime, localtimestamp;
    _col0     |          _col1
--------------+-------------------------
 13:33:37.711 | 2020-05-25 14:33:37.711
(1 row)

It appears that the value of localtime is being affected by daylight savings offset.

@findepi
Copy link
Member

findepi commented May 26, 2020

Same for current_time -- #3850

See
https://github.com/prestosql/presto/blob/7ff3ace9e84848943e4dbc232a9162fa14998d72/presto-main/src/main/java/io/prestosql/operator/scalar/DateTimeFunctions.java#L112-L118

even though time with time zone is "the same" for both semantics, we were consciouly not fixing function result for legacy semantics (to avoid breaking changes, anticipating the cut over to new semantocs will follow up soon)
I am not saying it was the right thing to do, but there may be some more problems like that.

@findepi findepi mentioned this issue May 28, 2020
8 tasks
@findepi findepi added this to the 334 milestone May 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working correctness
Development

Successfully merging a pull request may close this issue.

2 participants