MySQL: Timezone

  • The default value is SYSTEM, which indicates that the system time zone defined in the system_time_zone system variable will be used. See System Time Zone below for more information.
  • An offset from Coordinated Universal Time (UTC), such as +5:00 or -9:00, can also be used.
  • If the time zone tables in the mysql database were loaded, then a named time zone, such as America/New_YorkAfrica/Johannesburg, or Europe/Helsinki, is also permissible. See mysql Time Zone Tables below for more information.

Global set (permanent)

SET GLOBAL time_zone="SYSTEM"  // Default
SET GLOBAL time_zone="+07:00"

Session set (reset when you logout)

SET time_zone="SYSTEM"  // Default
SET time_zone="+07:00"

References:


Comments

Leave a Reply

Your email address will not be published. Required fields are marked *