Ad Widget

Collapse

strtotime(): It is not safe to rely on the system's timezone settings.

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • jancs
    Member
    • Jul 2014
    • 30

    #1

    strtotime(): It is not safe to rely on the system's timezone settings.

    Hi!
    I have a strange problem - my dashboard screen is full of the following messages:
    • 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. [zabbix.php:21 → require_once() → ZBase->run() → ZBase->authenticateUser() → CWebUser::checkAuthentication() → CWebUser::setSessionCookie() → strtotime() in include/classes/user/CWebUser.php:151]
    • 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. [zabbix.php:21 → require_once() → ZBase->run() → ZBase->processRequest() → CController->run() → CControllerDashboardView->doAction() → calculateTime() → date() in include/func.inc.php:2610]
    • mktime(): 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. [zabbix.php:21 → require_once() → ZBase->run() → ZBase->processRequest() → CController->run() → CControllerDashboardView->doAction() → calculateTime() → zbxDateToTime() → mktime() in include/func.inc.php:312]
    I virtually did evrth possible - the php.ini file contains timezone setting ( date.timezone = "Europe/Riga" ) but it seem somehow not being sufficient enough.
    System - Linux64/php 5.6.40/apache 2.4.34/Zabbix 3.4.15.

    Any ideas?
  • gcalenko
    Zabbix developer
    • Mar 2017
    • 27

    #2
    Hi. Did you tried:
    1. remove quotes from timezone string - date.timezone = Europe/Riga
    2. change timezone string to UTC

    Comment


    • jancs
      jancs commented
      Editing a comment
      No success. Neither for Europe/Riga nor UTC with any kind of quotes.
  • gcalenko
    Zabbix developer
    • Mar 2017
    • 27

    #3
    Can you confirm that apache is using correct php.ini file ?

    1. create phpinfo.php file in web server root directory with following content: <?php phpinfo();
    2. open browser and point to http://yourinstalationhostnamehere/phpinfo.php
    3. check value of "Loaded Configuration File", it contains path to .ini file used by apache
    4. remove phpinfo.php file

    Did you restarted apache and/or php-fpm after php.ini file changes ?

    Comment

    Working...