Changing the Time Zone

Our servers have been set up with the Time Zone as Newfoundland Dynamic Time (NDT). You can modify your scripts to use EST or any other timezone you need by the following methods:

1) Using the function "putenv" in php scripts:
==============================================
To convert Time Zone using putenv

echo "Original Time: ". date("h:i:s")."\n";
putenv("TZ=US/Eastern");
echo "New Time: ". date("h:i:s")."\n";
?>
==============================================

2) By putting the following in the .htaccess file in your main public_html folder :

==============================================
# Set to Eastern time zone
SetEnv TZ Canada/Eastern

# Similar command but affects PHP
php_value date.timezone Canada/Eastern
==============================================

  • 1 Users Found This Useful
Was this answer helpful?

Related Articles

Turning on register_globals

We do not support turning on register_globals. As documented by the PHP developers, using...

PHP 4 or 5 installed?

You can use the "Select PHP version" feature inside the applicable cPanel account for your...

Do you support the $HTTP_*_VARS variables

We do not guarantee that PHP scripts using theis older and insecure global variables will work...

Seeing a blank page or unusual behaviour?

If you are seeing a blank page or unusual behaviour, it is likely that there is an error in your...