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

Timestamp differs when queried from presto and trino with mysql databases. #23960

Open
naveenbussari opened this issue Oct 29, 2024 · 2 comments

Comments

@naveenbussari
Copy link

We currently have presto running on kubernetes.
We are exploring migrating from presto to trino(in the same kubernetes cluster)

We are facing issues with the timestamp specifically with the mysql database.
Trino is returning the values in timestamp column in UTC where as the actual mysql db stores timestamp in (IST) Asia/Kolkata timezone.

trino version: 432

The actual mysql databases stores the timestamp in IST ( Asia/Kolkata )

Image

When queried from Presto , the data is returned as it is in mysql db i.e., Asia/Kolkata timezone.

Image

When queried from Trino, the data is returned in UTC timezone.

Image

I tried adding the property serverTimezone=Asia/Kolkata . But this didn't work.

When I use the AT TIME ZONE clause with the query in trino it works,
Image

This is happening only with mySQL databases but not postgreSQL.
I have checked with multiple catalogs and databases.
In postgres databases, the results are in IST in Presto as well as Trino as it is stored in the actual postgres database.

How can I get the values in timestamp column in Asia/Kolkata timezone?

@martint
Copy link
Member

martint commented Oct 29, 2024

cc @hashhar @ebyhr

@ebyhr ebyhr changed the title Timestamp differs when queried from presto and trino with mysql databases. Timestamp differs when queried from Trino with mysql databases Oct 30, 2024
@ebyhr ebyhr changed the title Timestamp differs when queried from Trino with mysql databases Timestamp differs when queried from presto and trino with mysql databases. Oct 30, 2024
@naveenbussari
Copy link
Author

@ebyhr
could you please help here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants