Tagscheap vps cloud hosting cloud servers CMS Hosting cPanel/WHM cPanel Hosting dedicated hosting dedicated server dedicated server hosting Dedicated Servers dedicated ssl domain name dotnetpanel drupal website hosting ecommerce hosting Fantastico joomla hosting joomla web hosting joomla website hosting Linux Hosting Linux Reseller Hosting linux vps Load Balanced Server phpBB Forum Hosting phpBB Hosting Plesk Plesk Control Panel Reseller Hosting Sales FAQ Semi Dedicated Hosting shared hosting ssl certificate Virtual Private Servers vps VPS Hosting Web Hosting UK Windows Dedicated Server Windows Hosting windows reseller Windows Reseller Hosting windows vps Windows VPS Hosting Wordpress wordpress hosting wordpress web hosting
How to edit the date.timezone value in PHP?
Some time your PHP scripts doesn’t show the right time, the reason behind not showing the right time is probably your hosting server could be in a different timezone. This can be easily resolved by changing a setting in PHP called date.timezone.
It purely depending on the location, with the appropriate changes we can set a specific date.timezone value in PHP using the following option which should be added to your local php.ini file:
date.timezone = “UK/Central”
The above example assumes you’d like to set the timezone for your PHP scripts to US/Central. The full list of supported time zones is available here and you should simply replace “UK/Central” with the desired timezone.