How to change timezone on Apache Webserver
My Apache Webserver had not timezone correct. It is very important to have same time zone settings between platforms when migrating existing calendar applications based on timestamp and using mktime() calls in php scripts.
I can remenber problems when changing platforms from wampserver to ubuntu apache web server with webcalendar, mrbs open source ….
How to check which timezone in Linux ?
If I wanted timezone correct, I had to do some configuration on Apache Webserver. But how to do this?
To change timezone on my Apache Webserver, I followed the next steps:
sudo nano /etc/php5/apache2/php.ini
Search for “date.timezone” under [Date] and modify :
or to another timezone
Save the file and exit using CTRL+X;
Restart apache2 to take effect
sudo /etc/init.d/apache2 restart
You can use phpinfo(); to read date end time zone configuration too under date