Ошибка PHP: Warning: strtotime(): It is not safe to rely on the system's timezone settings.Проявляется следующим образом: на сайте можно увидеть перед контентом следующее:
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 'Asia/Yakutsk' for 'YAKT/10.0/no DST' instead in /var/www/html/libraries/joomla/utilities/date.php on line 56 Warning: 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 'Asia/Yakutsk' for 'YAKT/10.0/no DST' instead in /var/www/html/libraries/joomla/utilities/date.php on line 198
Причем, если у вас на странице несколько фреймов, сообщение будет висеть в каждом из них.
Решение.
Необходимо отредактировать временную зону в php.ini. Ищем следующие строки равим параметр date.timezone.
;;;;;;;;;;;;;;;;;;;
; Module Settings ;
;;;;;;;;;;;;;;;;;;;
[Date]
; Defines the default timezone used by the date functions
;date.timezone =
По умолчанию данный параметр не имеет значения. Необходимо указать конкретную временную зону.
Перечень временных зон можно посмотреть по адресу:
http://php.net/manual/ru/timezones.asia.php
Таким образом, параметр date.timezone должен иметь примерно такой вид: ;;;;;;;;;;;;;;;;;;; ; Module Settings ; ;;;;;;;;;;;;;;;;;;;
[Date] ; Defines the default timezone used by the date functions date.timezone = Asia/Yakutsk
Перезапускаем сервис httpd. Готово.
|