The MySQL 8 server manages time zones in three different ways:
- System time zone: This is managed by the system_time_zone system variable, which can be set either by –timezone=timezone_name or by the TZ environment variable before execution of mysqld.
- Server's current time zone: This is managed by the time_zone system variable. The default value of the time_zone variable is SYSTEM, which means the server time zone is the same as the system time zone. MySQL 8 allows users to set the time_zone global variable value at startup time by specifying default-time-zone='timezone' in the option file, and at runtime by using the following command:
mysql> SET GLOBAL time_zone = timezone;
- Pre-connection time zone: This ...