Setting the time zone on the server

Guidelines for setting the time zone (timezones) on the server

Changing the Time Zone for PHP

Changing via .htaccess

Add the following line to the .htaccess file located in the root directory of your website:

php_value date.timezone "Region/Zone"

Changing via php.ini

Open the php.ini file and add or modify the following line:

date.timezone = "Region/Zone"

List of time zones for configuration timezone:

Africa/Cairo
Africa/Casablanca 
Africa/Harare
Africa/Monrovia
Africa/Nairobi 
America/Bogota 
America/Buenos_Aires
America/Caracas
America/Chihuahua 
America/La_Paz 
America/Lima
America/Mazatlan
America/Mexico_City 
America/Monterrey 
America/Santiago
America/Tijuana
Asia/Almaty
Asia/Baghdad
Asia/Baku
Asia/Bangkok
Asia/Chongqing 
Asia/Dhaka 
Asia/Hong_Kong 
Asia/Irkutsk
Asia/Jakarta
Asia/Jerusalem 
Asia/Kabul 
Asia/Karachi
Asia/Kathmandu 
Asia/Kolkata
Asia/Krasnoyarsk
Asia/Kuala_Lumpur 
Asia/Kuwait
Asia/Magadan
Asia/Muscat
Asia/Novosibirsk
Asia/Riyadh
Asia/Seoul 
Asia/Singapore 
Asia/Taipei
Asia/Tashkent
Asia/Tbilisi
Asia/Tehran
Asia/Tokyo 
Asia/Ulaanbaatar
Asia/Urumqi
Asia/Vladivostok
Asia/Yakutsk
Asia/Yekaterinburg
Asia/Yerevan
Atlantic/Azores
Atlantic/Cape_Verde 
Atlantic/Stanley
Australia/Adelaide
Australia/Brisbane
Australia/Canberra
Australia/Darwin
Australia/Hobart
Australia/Melbourne 
Australia/Perth
Australia/Sydney
Canada/Atlantic
Canada/Newfoundland 
Canada/Saskatchewan 
Europe/Amsterdam
Europe/Athens
Europe/Belgrade
Europe/Berlin
Europe/Bratislava 
Europe/Brussels
Europe/Bucharest
Europe/Budapest
Europe/Copenhagen 
Europe/Dublin
Europe/Helsinki
Europe/Istanbul
Europe/Kiev
Europe/Lisbon
Europe/Ljubljana
Europe/London
Europe/Madrid
Europe/Minsk
Europe/Moscow
Europe/Paris
Europe/Prague
Europe/Riga
Europe/Rome
Europe/Sarajevo
Europe/Skopje
Europe/Sofia
Europe/Stockholm
Europe/Tallinn 
Europe/Vienna
Europe/Vilnius
Europe/Volgograd
Europe/Warsaw
Europe/Zagreb
Greenland
Pacific/Auckland
Pacific/Fiji
Pacific/Guam
Pacific/Midway
Pacific/Port_Moresby
US/Alaska
US/Arizona
US/Central
US/Eastern
US/East-Indiana
US/Hawaii
US/Mountain
US/Pacific
US/Samoa

Global Time Zone Configuration on the Server

To change the system-wide time zone, you can use the timedatectl command.

Checking the current time zone:

timedatectl status

Getting a list of available time zones:

timedatectl list-timezones

To search for a specific time zone, you can use grep:

timedatectl list-timezones | grep UTC

Setting a new time zone:

sudo timedatectl set-timezone "Region/Zone"

Help

If you have any additional questions, you can always contact our support team via the ticket system or live chat.

Updated at:
3/11/2025, 06:56
Previous article
Sentry
Next article
Sphinx
Need help?Our engineers will help you free of charge with any question in minutesContact us