MySQL timezone support warning in Craft CMS
Home » BLOG » Web development » MySQL timezone support warning in Craft CMS

MySQL timezone support warning in Craft CMS

category:  Web development

Craft CMS is a CMS (Content Manage System) built on Yii2, and Twig. It is extendable. You can create a website or eCommerce website from Craft CMS. There is a free version for a personal website and paid version for more features. Also, there are free plugins and paid plugins available. It is the same concept with WordPress. But WordPress is more popular than Craft CMS.

In order to use Craft CMS, your development system needs to meet the system requirements. After you install CraftCMS (For Windows, you should install CraftCMS via Web Browser Setup), you can check the system requirements again via CraftCMS backend at “utilities/system report/requirements“.

One of the warnings I have is the MySQL timezone support warning. To fix it, follow the steps below.

  • Open my.ini and add the setting below into the end of file if you don’t have this timezone setting yet.
default-time-zone = "+07:00"

Set the timezone as you need. Mine is “+7:00”. Once you set it, you can check at MySql terminal with this query.

select @@global.time_zone
  • In your mysql database, search for time_zone, time_zone_name, time_zone_transitions and time_zone_transition_types tables. You will see no data in these tables.
  • Next, you wanna download the timezone data tables from MySQL timezone.
  • Pick the timezone data table to match your mysql version. I download a POSIX standard version.
  • Extract the downloaded timezone data table file. You will get the “timezone_posix.sql“.
  • Lastly, at your mysql database, import the “timezone_posix.sql” in order to insert the data into all timezone tables.
  • Now, refresh your Craft CMS to see the system report again. MySQL timezone support should be good now.

Here is a useful link from Craft CMS => Populating MySQL and Maria DB Timezone Tables