Mysql take less time than the current time 13 hours

Problem discovery process:

In mysql through, select version (); View to version 5.7.27. Because the former are used in version 5.6, and now the time to write the interface, check out the discovery of the recording time is always wrong, and exactly 13 hours, through access to relevant documents, found time zone database using a time zone of the United States west 5 , while China with the East area 8, exactly 13 hours.

 

Solution:

When connected to the specified time zone mysql: jdbc: mysql: // localhost:? 3306 / db serverTimezone = Asia / Shanghai & useUnicode = true & characterEncoding = utf-8 & allowMultiQueries = true & autoReconnect = true

 

Guess you like

Origin www.cnblogs.com/greys/p/11669869.html