MySQL Forums
Forum List  »  Connector/JDBC and Java

[Q] Best practice about timezone conversion.
Posted by: 博之 佐藤
Date: June 24, 2017 07:36AM

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.

Options: ReplyQuote


Subject
Written By
Posted
[Q] Best practice about timezone conversion.
June 24, 2017 07:36AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.