1. Home
  2. MySQL Databases
  3. How to change database timezone in phpMyAdmin

How to change database timezone in phpMyAdmin

You can change the timezone of your database in MySQL for the current session by following the steps below:
 
Step 1:  Login to cPanel and click the phpMyAdmin icon under the Databases section
 
Step 2:  Once you’re in phpMyAdmin, select your database from the left side by clicking on it.
 
Step 3:  Click the SQL tab, and insert the following command with your desired timezone: 
 
SET time_zone ='+06:00';
 
Step 4:  Lastly, click the Go button in the bottom right and that’s it!  You have successfully changed the time zone for your database using phpMyAdmin.
 
 
Important

The above steps will only modify the timezone for the current MySQL session.  After the current session ends the time zone will reset to the servers default timezone.

Note

It’s best to use the PHP function date_default_timezone function to set your own time zone for your website.  Click here for a list of Timezones

Updated on September 4, 2021

Was this article helpful?

Related Articles