[CONJ-143] ResultSet.getTime() shouldn't convert TIME fields to the server time-zone Created: 2015-03-02 Updated: 2016-08-24 Resolved: 2016-08-24 |
|
| Status: | Closed |
| Project: | MariaDB Connector/J |
| Component/s: | Other |
| Affects Version/s: | 1.1.6, 1.1.7, 1.1.8 |
| Fix Version/s: | 1.3.0 |
| Type: | Bug | Priority: | Major |
| Reporter: | Sebastian Lövdahl | Assignee: | Diego Dupin |
| Resolution: | Fixed | Votes: | 1 |
| Labels: | None | ||
| Environment: |
Ubuntu 14.10, MariaDB 5.5.41-1ubuntu0.14.10.1 |
||
| Issue Links: |
|
||||||||||||
| Description |
|
According to the time-zone documentation on https://mariadb.com/kb/en/mariadb/time-zones/ TIME fields should NOT be affected by the server time-zone. After https://mariadb.atlassian.net/browse/CONJ-65 was solved (from 1.1.6 and onwards, that is) ResultSet.getTime() began converting TIME columns to the server time-zone. This differs from what MySQL Connector/J version 5.1 does at least. |
| Comments |
| Comment by Sebastian Lövdahl [ 2015-03-02 ] |
|
ResultSet.getDate() could also be affected by this. |
| Comment by diego dupin (Inactive) [ 2015-05-06 ] |
|
By default, the server time zone is used, and that is normal. The MariaDB connector work accordingly. But your are right, using mysql Connector/J 5.1 work by default only in UTC with MariaDB , So depending on your needs :
(and restart MariaDB)
|
| Comment by Sebastian Lövdahl [ 2015-05-07 ] |
|
Sorry, I wasn't clear enough in the original description. What I meant by "This differs from what MySQL Connector/J version 5.1 does at least." was that the described behaviour differs from the mysql connector with mysql server (not mysql connector+mariadb server). I'm not interested in using mysql connector with mariadb server at all. The issue is that the same code behaves differently when mariadb connector+server and mysql connector+server is used. >> By default, the server time zone is used, and that is normal. The MariaDB connector work accordingly. How is that normal? The documentation I linked to clearly states that "Some functions are not affected. These include: UTC_TIMESTAMP() as well as DATETIME, DATE and TIME columns.". When mysql connector+server is used no conversion is done. |
| Comment by Diego Dupin [ 2016-08-24 ] |
|
Forget to close this issue since it was relative to |