UTC problem I can't solve - 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: UTC problem I can't solve (/showthread.php?tid=7768) |
UTC problem I can't solve - Harry77 - 2015-12-11 Hi, I have a getsimple 3.3.7 installation, previously it was installed in vestacp using centos 6, now I installed vestacp in CENTOS 7 X86_64 and I noticed that since I installed it in the new operating system I have the errorlog.txt in /data/other/logs which has become 600MB in a few days, The repeted error is the following: PHP Warning: 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 the timezone 'UTC' for now, but please set date.timezone to select your timezone. in /home/admin/web/mysite.tld/public_html/plugins/news_manager/inc/functions.php on line 25 Line 25 in /home/admin/web/mysite.tld/public_html/plugins/news_manager/inc/functions.php is the following: if ($all || $item->private != 'Y' && strtotime($item->date) < $now) I tried to change this line by placing my UTC here and there but the error still remain. Does anybody knows how to modify that line? I thank you in advance P.S. newsmanager version is 3.2.2 RE: UTC problem I can't solve - Carlos - 2015-12-11 Have you selected a Local Timezone in your site settings? Is there a date.timezone entry in your server's php.ini? RE: UTC problem I can't solve - Harry77 - 2015-12-11 (2015-12-11, 03:55:07)Carlos Wrote: Have you selected a Local Timezone in your site settings? Local timezone in my site setting is Europe/Amsterdam, then I setup php.ini timezone "date.timezone = "Europe/Amsterdam"" and restarted httpd, also, I have made the following: timedatectl set-timezone Europe/Amsterdam an the timedatectl output is: Local time: ven 2015-12-11 07:57:49 CET Universal time: ven 2015-12-11 06:57:49 UTC Timezone: Europe/Amsterdam (CET, +0100) NTP enabled: no NTP synchronized: yes RTC in local TZ: no DST active: no Last DST change: DST ended at dom 2015-10-25 02:59:59 CEST dom 2015-10-25 02:00:00 CET Next DST change: DST begins (the clock jumps one hour forward) at dom 2016-03-27 01:59:59 CET dom 2016-03-27 03:00:00 CEST So I think that I can say that the server timezone is correct and it matches the configuration of the site. But now I got two different errors: [11-Dec-2015 07:10:57 UTC] PHP Warning: 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 the timezone 'UTC' for now, but please set date.timezone to select your timezone. in /home/admin/web/mysite.tld/public_html/plugins/news_manager/inc/site.php on line 353 line 353 is: $date = nm_get_date(i18n_r('news_manager/DATE_FORMAT'), strtotime($post->date)); and [11-Dec-2015 07:10:57 UTC] PHP Warning: strftime(): 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. in /home/admin/web/mysite.tld/public_html/plugins/news_manager/inc/functions.php on line 107 line 107 is: $date = strftime($format, $timestamp); I installed many times getsimple+newsmanager and in many differents kind of server and control panel but I only had this problem with centos 7, I admit to not being able to speculate on what the problem is but I seen this problem with this OS only so I think that the two things can be connected. RE: UTC problem I can't solve - shawn_a - 2015-12-11 Set timezone in gsconfig, it seems your date.timezone is not working properly. Also php changed this error at some point back to be not so noisy in later versions. RE: UTC problem I can't solve - Harry77 - 2015-12-12 (2015-12-11, 22:47:19)shawn_a Wrote: Set timezone in gsconfig, it seems your date.timezone is not working properly. Solved. I thank you, |