If you get this error:
Then create/open the file named php.ini in the same folder as the file giving the error.
In the same folder create or open the file named .htaccess.
In .htaccess put this code:
In the php.ini file put this code:
The main PHP timezone codes for Canada are:
A reference of all PHP timezones is here
To verifiy the setting took effect create a phpinfo.php page. There is a tutorial on how to create a phpinfo.php file in our knowledgebase.
Warning: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone.
Then create/open the file named php.ini in the same folder as the file giving the error.
In the same folder create or open the file named .htaccess.
In .htaccess put this code:
<IfModule mod_suphp.c>
suPHP_ConfigPath /home/cpanelusername/otherfoldersifany/php.ini
<Files php.ini>
order allow,deny
deny from all
</Files>
</IfModule>
In the php.ini file put this code:
date.timezone = "America/Toronto"
The main PHP timezone codes for Canada are:
- America/Cambridge_Bay
- America/Dawson
- America/Dawson_Creek
- America/Fort_Nelson
- America/Edmonton
- America/Glace_Bay
- America/Goose_Bay
- America/Halifax
- America/Inuvik
- America/Moncton
- America/St_Johns
- America/Toronto
- America/Vancouver
- America/Whitehorse
- America/Vancouver
- America/Winnipeg
- America/Yellowknife
A reference of all PHP timezones is here
To verifiy the setting took effect create a phpinfo.php page. There is a tutorial on how to create a phpinfo.php file in our knowledgebase.