How to Change the Database Timezone on phpMyAdmin at Hostinger

Changing the time zone of a database via phpMyAdmin on Hostinger

Updated 2 weeks ago

You can easily set the time zone of your database session by using an SQL command in phpMyAdmin. Just open your database using phpMyAdmin and go to the SQL section:

phpMyAdmin SQL tab highlighted next to Structure, Search, Query and Export on a database page

Once there, insert the following command:

SET time_zone = '+hh:00';

Replacing +hh with the UTC timezone. For example, UTC-03:00 would be:

SET time_zone = '-03:00';

Next, click on the Go button to apply the changes:

phpMyAdmin SQL query box with SET time_zone = '+08:00'; and the Go button highlighted

That’s it! You have successfully changed the time zone for the current MySQL session on your database.

NOTES:

  • After the current session ends, the time zone will be changed to the default one (UTC+00:00). Alternatively, you can use the PHP date_default_timezone function to set your website’s timezone

  • If you need to permanently change your global server timezone, you can consider a VPS plan