Portal Home > Knowledgebase > Software > Can I change the server clock or time zone?


Can I change the server clock or time zone?




The server clock is set to Central Standard Time. You cannot change the time on the server clock.

You can change the time zone being displayed with a PHP script. (Unfortunately, I cannot tell you where to put this code. You will need to consult with the program developer.) Here are two sample codes:

<?php
putenv("TZ=Europe/Amsterdam");
?>
<?php
date_default_timezone_set("America/Los_Angeles");
?>

You can set the timezone in .htaccess as well. (You can create a New File and name it ".htaccess", or you can edit the existing one. The .htaccess file belongs in /public_html/ - or a subdirectory if for a subdomain or addon domain). Add the line:

SetEnv TZ America/Indianapolis

Here is a list of supported timezones.



Was this answer helpful?

Add to Favourites Add to Favourites    Print this Article Print this Article

Also Read
Dreamweaver settings (Views: 1825)