This video show you how to resolve MySQL JDBC Driver 5.1.33 – Time Zone Issue.
Add to your database connection this line
useJDBCCompliantTimezoneShift=true;useLegacyDatetimeCode=false;serverTimezone=UTC;
Tag: set timezone mysql, [vid_tags]
Xem Thêm Bài Viết Về Mẹo Hay Khác: https://meocongnghe.vn/meo-hay
Nguồn: https://meocongnghe.vn

Previous Post
Hướng dẫn set ram ảo để chơi game mượt
“Identifier name is too long” fuck sake
My computer screen would need to be the size of a blue whale to figure out what the hell is going on here
man , what is the music, i feel it somehow like Pokemon , thanks for the solution BTW
…..
public class ConexionDB {
protected Connection cn = null;
protected PreparedStatement pr = null;
protected ResultSet rs = null;
public ConexionDB(){
try {
System.out.println("Conectando a la base de datos");
Class.forName("com.mysql.cj.jdbc.Driver");
cn = DriverManager.getConnection("jdbc:mysql://localhost:3306/almacenunalm?autoReconnect=true&useSSL=false&suseJDBCCompliantTimezoneShift=true;useLegacyDatetimeCode=false;serverTimezone=UTC;", "root", "mysql");
if(Objects.nonNull(cn)){
System.out.println("Conexion abierta [" + cn + "] ::: ok");
}
} catch (ClassNotFoundException | SQLException ex) {
System.out.println(ex.getMessage());
}
}
public Connection obtenerConexion() {
return cn;
}
public void cerrarConexion() {
try {
System.out.println("Cerrando conexion a base de datos: [" + obtenerConexion() + "]");
if (Objects.nonNull(obtenerConexion())) {
obtenerConexion().close();
System.out.println("Conexion cerrada");
}
} catch (SQLException ex) {
System.out.println(ex);
}
}
YES, THANK SOT MATCH!
yess, found for mysql 8 iam using netbeans 8.2 java 8 and os: ubuntu 18.0.4
put & instead of ;
According to the mysql documentation, the property useJDBCCompliantTimezoneShift "has an effect only when useLegacyDatetimeCode=true". You're setting useLegacyDatetimeCode to false, so I don't see why you need useJDBCCompliantTimezoneShift in the string as well. Reference: https://dev.mysql.com/doc/connector-j/5.1/en/connector-j-reference-configuration-properties.html
didn't work :/
didnt work ;
This would be a better solution video if you have preferred to tell us what you did here, instead of inserting that music.