shopify analytics ecommerce

PHP’s timezone settings

After the upgrade to PHP 5.3, similar to the following error message appears when using date-related functions:

Warning: strtotime () [function.strtotime]: 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 ‘Europe / Helsinki’ for ‘EEST / 3.0 / DST’ instead in /Path_to_your/www/wp-includes/functions.php on line 35

Warning: date () [function.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 ‘Europe / Helsinki’ for ‘EEST / 3.0 / DST’ instead in /Path_to_your/www/wp-includes/functions.php on line 43

Solutions are possible by modifying the php.ini or php code to achieve:
1. Modify the php.ini
Add a line in php.ini:
date.timezone = “Asia / Hong_Kong”

After storage you need to restart web server.

2. Modify the php code in php program’s most open Baking add the following line syntax:

date_default_timezone_set (‘Asia / Hong_Kong’);

Used above “Asia / Hong_Kong” on behalf of the Hong Kong time zone to other time zones can PHP Timezone to find.

Leave a Reply