Quantcast
Channel: MySQL Forums - Connector/J, JDBC and Java
Viewing all articles
Browse latest Browse all 884

[Q] Best practice about timezone conversion. (no replies)

$
0
0
Hello, members.

I would like to know the best practice.
Could you tell me what parameters I should set in the latest Connector/J(5.1.42)?

Parameters

* useLegacyDatetimeCode
* serverTimeZone
* noTimezoneConversionForDateType
* cacheDefaultTimezone

Environment.

* Client and server time zones differ. (ex. Server: UTC, Client Asia/Tokyo)
* Client and server time zones are the same. (ex. Server and Client is Asia/Tokyo).

It worked as I expected in the Connector/J version 5.1.34.

* Client and server time zones differ.
useLegacyDatetimeCode: false
serverTimeZone: UTC

* Client and server time zones are the same.
no options

The noTimezoneConversionForDateType and cacheDefaultTimezone introduced in the 5.1.35.
But I can't find a document about those parameters combination settings.

https://dev.mysql.com/doc/relnotes/connector-j/5.1/en/news-5-1-35.html

noTimezoneConversionForDateType and cacheDefaultTimezone:
For improving Connector/J's time zone support;
see the changelog entry for Bug #18028319/Bug #71084 below for details

Best regards

--
Hiroyuki Sato.

Viewing all articles
Browse latest Browse all 884

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>