When programming to access the MySQL database, the time zone error is reported as follows:
The server time zone value ' й ' is unrecognized or represents more than one time zone
There are usually two workarounds:
First, add the SERVERTIMEZONE=UTC after the database connection statement, which is the default 0 time zone, but be aware that the statement needs to follow the first location of the database connection statement, otherwise it will be an error, for example:
Jdbc.url=jdbc:mysql://localhost:3306/testdatabase?servertimezone=utc&useunicode=true&characterencoding =utf-8
However, there is a problem that when you insert a time field into the database, the time is 8 hours earlier than the current time, that is, the current system time is reduced by 8 hours.
Second, modify the MySQL time zone to the East 8 zone, execute the following command:
Set global time_zone= ' "
MySQL Error: The server time zone value is unrecognized or represents more than one time zone