[CONJ-990] Setting timezone=UTC result in SQLSyntaxErrorException Created: 2022-07-08 Updated: 2022-07-25 Resolved: 2022-07-25 |
|
| Status: | Closed |
| Project: | MariaDB Connector/J |
| Component/s: | JDBC compatibility |
| Affects Version/s: | 3.0.5 |
| Fix Version/s: | 3.0.7 |
| Type: | Bug | Priority: | Major |
| Reporter: | Michael Simons | Assignee: | Diego Dupin |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | UTC, timezones | ||
| Description |
|
Given a server that does not run in UTC, the new `timezone` parameter described here https://mariadb.com/kb/en/about-mariadb-connector-j/#jdbc-api-implementation-notes cannot work, even with mysql_tzinfo_to_sql fully and correctly loaded. In `StandardClient` UTC get's translated into a fixed offset:
Which is literal `Z` (See `System.out.println(ZoneId.of("UTC").getRules().getOffset(Instant.now()));`} MariaDB server cannot handle this, resulting in
|
| Comments |
| Comment by Diego Dupin [ 2022-07-25 ] |
|
right, strangely, this went unnoticed |
| Comment by Diego Dupin [ 2022-07-25 ] |
|
corrected with https://github.com/mariadb-corporation/mariadb-connector-j/commit/fec07087915baa9bce5c0b2d5b64215397e6ebce |
| Comment by Michael Simons [ 2022-07-25 ] |
|
Thanks, Diego, for looking into and fixing this. And no worries, stuff happens all the time. |