[CONJ-349] Connector disregards calendar argument for DATETIME parameters. Created: 2016-09-14 Updated: 2016-09-14 |
|
| Status: | Open |
| Project: | MariaDB Connector/J |
| Component/s: | None |
| Affects Version/s: | 1.3.0 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major |
| Reporter: | Vitali Haravy | Assignee: | Diego Dupin |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | datetime | ||
| Environment: |
Windows, MariaDB 10.1 |
||
| Description |
|
MariaDB Connector/J introduced new DATETIME implementation in version 1.3.0 which breaks legacy code even though useLegacyDatetimeCode is set to true. Before, we have used version 1.1.8 in the following manner (simplified):
Thus, we instructed to always use UTC regardless of the server/client TimeZone. After upgrading to the version 1.4.2 the above-mentioned code stopped working even with useLegacyDatetimeCode set to true. This is rather obvious if we take a look at TimestampParameter source code:
As you can see, this code completely disregards calendar passed to it as a parameter (it saved in the constructor). As I see it, it is a breaking change. If I set useLegacyDatetimeCode to false it will use server's time zone, which also is not a behavior we are trying to achieve. |