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

jdbc syntax for timezone support (no replies)

$
0
0
These connection strings both work. I found a number of examples on how to do this and I'm not 100% how to prove it.

jdbc:mysql://localhost:3306/mytestdatabase?serverTimezone=Europe/London#?connectTimeout=5&socketTimeout=0&autoReconnect=true

jdbc:mysql://localhost/mytestdatabase?serverTimezone=Europe/London#?connectTimeout=5&socketTimeout=0&autoReconnect=true

There is a # after the timezone which does not seem to cause a problem and a / within the timezone itself.

I tried multiple timezone strings when connecting to my local mysql database and it always seemed to connect.

If anyone has any comments on what I could do better or the significance of the # symbol it would be appreciated.

Should I be able to connect to my local mysql database if I'm specifying something other than Europe/London - as this is the default for my workstation

Thanks

Dave

Viewing all articles
Browse latest Browse all 884

Trending Articles



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