GetSimple Support Forum
Error Strict Standards: strtotime() ... - Printable Version

+- GetSimple Support Forum (http://get-simple.info/forums)
+-- Forum: GetSimple (http://get-simple.info/forums/forumdisplay.php?fid=3)
+--- Forum: General Questions and Problems (http://get-simple.info/forums/forumdisplay.php?fid=16)
+--- Thread: Error Strict Standards: strtotime() ... (/showthread.php?tid=5769)



Error Strict Standards: strtotime() ... - wakh - 2014-03-12

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?


RE: Error Strict Standards: strtotime() ... - wakh - 2014-03-12

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.


RE: Error Strict Standards: strtotime() ... - shawn_a - 2014-03-12

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


RE: Error Strict Standards: strtotime() ... - wakh - 2014-03-12

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


RE: Error Strict Standards: strtotime() ... - shawn_a - 2014-03-12

yes