Categories
Development Ubuntu 16.04 Server

How to Set Time Zone on Ubuntu 16.04 Apache Server

Here we’ll cover how to set the default time zone on your Ubuntu 16.04 Apache Server.

First, open your php.ini file (found within the /etc/ directory) in a plain text editor, your file path could vary but here are a couple of example of possible file paths:

/etc/php/7.0/apache2/php.ini
/etc/php.ini

Find the following line in the php.ini file. If there’s a semi-colon at the start of this line then remove the semi-colon to uncomment this.

date.timezone =

Set date.timezone equal to your continent and main city, a list of all available time zones can be found at http://php.net/manual/en/timezones.php

For Example:

date.timezone = Europe/London

Save your php.ini file and then restart Apache using the following command in terminal:

service apache2 restart

By Andy Corby

Hi, I'm Andy and I am a Digital Marketer and Full Stack Web Developer, with a BA (Honours) Business & Finance Degree (2:1) and 10+ Years Experience in Marketing and Development.

Leave a Reply

Your email address will not be published. Required fields are marked *

two × one =