PHP date - It is not safe to rely on systems timezone
Dobrý den,
když používám v PHP funkci date(), tak dostávám chybu PHP Warning: date(): It is not safe to rely on the system's timezone settings - poradíte co s tíM? děkuju
Dobrý den,
stačí jen definovat timezone v php.ini takto:
Změnit timezone na
když používám v PHP funkci date(), tak dostávám chybu PHP Warning: date(): It is not safe to rely on the system's timezone settings - poradíte co s tíM? děkuju
PHP 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 the timezone 'UTC' for now, but please set date.timezone to select your timezone. in /var/www/html/report-ph6/sendmail.php on line 5
ODPOVĚĎ
Dobrý den,
stačí jen definovat timezone v php.ini takto:
vim /etc/php.ini
Změnit timezone na
date.timezone = Europe/Prague
systemctl restart httpd