PHP date() error ….

Suatu ketika, saat setting development buat php programming, dengan nginx webserver, php5-fpm, dan mysql di debian linux..
saat di test, ternyata muncul error gini 🙂

PHP Error

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/Jakarta’ for ‘WIT/7.0/no DST’ instead

solusinya cukup simpel, tambahkan timezone di php.ini (tepatnya di file /etc/php5/fpm/php.ini) pada bagian
[Date], yakni

[Date]
; Defines the default timezone used by the date functions
; http://php.net/date.timezone
;date.timezone = ""

menjadi

[Date]
; Defines the default timezone used by the date functions
; http://php.net/date.timezone
date.timezone = "Asia/Jakarta"

Kemudian restart nginx dan php5-fpm service-nya 🙂 semoga tidak ada masalah

Advertisements

Leave a Reply

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

WordPress.com Logo

You are commenting using your WordPress.com 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

%d bloggers like this: