GetSimple Support Forum

Full Version: Error Strict Standards: strtotime() ...
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
GS 3.3.1a Beta / Bleeding Edge

get error (warning) on page which using plugin "guestbook"

Code:
Strict Standards: strtotime() [function.strtotime]: It is not safe to rely on the system's timezone settings. Please use the date.timezone setting, the TZ environment variable 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/Moscow' for 'MSK/4.0/no DST' instead in /var/www/u4978547/data/www/planeta-cars.ru/admin/inc/basic.php on line 336
...
Strict Standards: date() [function.date]: It is not safe to rely on the system's timezone settings. Please use the date.timezone setting, the TZ environment variable 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/Moscow' for 'MSK/4.0/no DST' instead in /var/www/u4978547/data/www/planeta-cars.ru/admin/inc/basic.php on line 336
totally 8 warnings

how to fix it?
hmmm... i guess solved
anyfile.html with:
php5
Code:
<?
echo date('Y-m-d H:i:s').PHP_EOL;
date_default_timezone_set('Europe/Kiev');
echo date('Y-m-d H:i:s').PHP_EOL;
?>
OR
php4
Code:
<?
echo date('Y-m-d H:i:s').PHP_EOL;
putenv ('TZ=Europe/Kiev');
echo date('Y-m-d H:i:s').PHP_EOL;
?>
run anyfile.html on server - profit!

but strange for CMS to use this method.
It means your server does not set a timezone, which it should.
Set it in gsconfig for fallback when not logged in or set for a user.

PHP Code:
# Define default timezone of server, accepts php timezone string
# valid timeszones can be found here http://www.php.net/manual/en/timezones.php
# define('GSTIMEZONE', 'America/Chicago'); 

also your version is old
(2014-03-12, 04:53:19)shawn_a Wrote: [ -> ]also your version is old
version of what? GS?
yes