How Do I Set the Default Time Zone for a Linux/PHP Website?
Default Time Zone
The default time zone in Rackspace Cloud sites is Central Time Zone (North America) and we do honour daylight savings time. The UTC offsets are:
Central Standard Time UTC−6:00
Central Daylight Time UTC−5:00
What to edit
To change your time zone on your Linux/PHP website, you will need to edit your .htaccess. An example of what you need to place in is:
php_value date.timezone TIMEZONE_HERE
And a fully working example with the time zone set to Dubai is:
php_value date.timezone Asia/Dubai
Note: For a comprehensive list of Time Zones, please refer to http://www.php.net/manual/en/timezones.php
How to test to make sure it worked
1) Check the PHP Information File...
Or by running this PHP file:
<?php echo date('l jS \of F Y h:i:s A'); ?>
© 2014 Rackspace US, Inc.
Except where otherwise noted, content on this site is licensed under a Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Unported License
See license specifics and DISCLAIMER