Ошибка PHP — function.date function.strtotime

После обновления MySQL, а соответственно всего что связанно с ним повылезали ошибки.
Проявились они немного позже, поэтому пришлось поломать голову от куда он взялись.


ОШИБКИ на сайте по управлением joomla:

Warning: strtotime () [function.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/Novosibirsk' for 'NOVT/6.0/no DST' instead in /var/www/html/libraries/joomla/utilities/date.php on line 56

Warning: strftime () [function.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 'Asia/Novosibirsk' for 'NOVT/6.0/no DST' instead in /var/www/html/libraries/joomla/utilities/date.php on line 250

ОШИБКИ на форуме по управлением phpBB:

[phpBB Debug] PHP Notice: in file /index.php on line 86: date () [function.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/Novosibirsk' for 'NOVT/6.0/no DST' instead
[phpBB Debug] PHP Notice: in file /index.php on line 86: getdate () [function.getdate]: 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/Novosibirsk' for 'NOVT/6.0/no DST' instead
[phpBB Debug] PHP Notice: in file /includes/functions_announcements.php on line 75: date () [function.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/Novosibirsk' for 'NOVT/6.0/no DST' instead
[phpBB Debug] PHP Notice: in file /includes/functions_announcements.php on line 75: getdate () [function.getdate]: 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/Novosibirsk' for 'NOVT/6.0/no DST' instead

Решение проблемы

Необходимо отредактировать временную зону в php.ini.
В php.ini правим date.timezone. В моём случае эта строка выглядела так:

;;;;;;;;;;;;;;;;;;;
; Module Settings ;
;;;;;;;;;;;;;;;;;;;
[Date]
; Defines the default timezone used by the date functions
date.timezone = Asia/Novosibirsk
Остались или есть ещё вопросы? Задавайте!
(не забудьте указать ссылку на этот пост)




3 комментария

  1. А как быть если отдельно взятый сайт должен работать в другой временной зоне?

    Thumb up 0 Thumb down 0

Оставить комментарий

Установка, настройка, мониторинг и администрирование linux, unix, windows систем