Banner Leaderboard
Headlines News :
Home » , » Warning: date(): It is not safe to rely on the system's timezone settings.

Warning: date(): It is not safe to rely on the system's timezone settings.

Written By Amir Sodikin on Jumat, 03 Januari 2014 | 17.32

Pada web-web joomla lama, joomla 1.5, yang berada di sistem server dengan php terkini, muncul warning seperti ini:


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 the timezone 'UTC' for now, but please set date.timezone to select your timezone. in /home/****/public_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 the timezone 'UTC' for now, but please set date.timezone to select your timezone. in /home/****/public_html/libraries/joomla/utilities/date.php on line 198

Untuk menghilangkan peringatan ini, ada beberapa cara, diantaranya dengan edit php.ini, namun kali ini saya tak berhasil, mungkin karena server menggunakan apachebooster yang tak lagi berjalan di apache namun di nginx.

Solusinya, bisa dengan edit file date.php seperti yang ditunjukkan di dalam error di atas.

Saya masukkan sebaris kode ini: date_default_timezone_set('Asia/Jakarta');

Ternyata errornya sudah tak muncul lagi.
Share this post :

Posting Komentar

 
Sister Website : OWH | Amir Sodikin | Complain
Copyright © 2011. AmirSodikin.COM: Viewtiful My Indonesia - All Rights Reserved