PHP – Warning date() timezone

A PHP Error was encountered

Severity: Warning

Message: 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.

solved with add timezone to your php.ini

nano /etc/php.ini


;date.timezone =

change to

date.timezone = Asia/Jakarta

restart service httpd

service httpd restart

Published by


just to remember what i had known :)

One thought on “PHP – Warning date() timezone”

  1. mantap mas infonya ini, jadi bisa lebih mengetahui tentang dunia ini 🙂 , btw infonya keren and berguna.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s