How to change the database timezone on phpMyAdmin at Hostinger

Changing the time zone of a database via phpMyAdmin on Hostinger

Updated 1 month ago

Change the database timezone on phpMyAdmin at Hostinger for your current MySQL session using an SQL command.

Before you start

Set the database session timezone

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