Monday 26 November 2018

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

Original Article Posted On: https://andycorby.com/set-time-zone-ubuntu-16-04-apache-server/

No comments:

Post a Comment