Related: #23960
Environment
- Trino version: 479 (upgraded from 397)
- MySQL server timezone:
Asia/Seoul
- Trino session timezone:
Asia/Seoul
- MySQL column type:
TIMESTAMP
Problem
Since #18470 (Trino 427), MySQL TIMESTAMP columns are mapped to timestamp(n) with time zone and values are always displayed in UTC.
SELECT orderdate FROM mysql_catalog.schema.table LIMIT 1;
-- Result: 2024-10-30 13:34:17 UTC
-- Expected: 2024-10-30 22:34:17 Asia/Seoul
I understand that AT TIME ZONE 'Asia/Seoul' can convert the display, and that the underlying data is correct (same instant in time). However, in our case, modifying queries is not feasible — we have many internal services that generate queries programmatically, and adding AT TIME ZONE to every timestamp column across all services would require significant effort.
What I've tried (none of these changed the display timezone)
- JDBC URL:
connectionTimeZone=Asia/Seoul&forceConnectionTimeZoneToSession=true
- JVM option:
-Duser.timezone=Asia/Seoul
- Catalog property:
jdbc.session-timezone=Asia/Seoul (error: property was not used)
Request
Is there a way to configure the MySQL catalog (or a session/system property) so that timestamp with time zone values are displayed in the session timezone instead of UTC?
For example, a catalog-level setting like jdbc.session-timezone (similar to the PostgreSQL connector) that would make query results render in the local timezone without requiring query modifications.
This would help users who upgraded from pre-427 versions where MySQL TIMESTAMP was mapped to timestamp(n) and displayed in the session timezone by default.
Related: #23960
Environment
Asia/SeoulAsia/SeoulTIMESTAMPProblem
Since #18470 (Trino 427), MySQL
TIMESTAMPcolumns are mapped totimestamp(n) with time zoneand values are always displayed in UTC.I understand that
AT TIME ZONE 'Asia/Seoul'can convert the display, and that the underlying data is correct (same instant in time). However, in our case, modifying queries is not feasible — we have many internal services that generate queries programmatically, and addingAT TIME ZONEto every timestamp column across all services would require significant effort.What I've tried (none of these changed the display timezone)
connectionTimeZone=Asia/Seoul&forceConnectionTimeZoneToSession=true-Duser.timezone=Asia/Seouljdbc.session-timezone=Asia/Seoul(error: property was not used)Request
Is there a way to configure the MySQL catalog (or a session/system property) so that
timestamp with time zonevalues are displayed in the session timezone instead of UTC?For example, a catalog-level setting like
jdbc.session-timezone(similar to the PostgreSQL connector) that would make query results render in the local timezone without requiring query modifications.This would help users who upgraded from pre-427 versions where MySQL
TIMESTAMPwas mapped totimestamp(n)and displayed in the session timezone by default.