
Now recently I’ve coded some date/time functionality in my project..
Ohh no…! :=(
I have got one nasty error
Message: 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/Karachi’ for ‘5.0/no DST’
Well well, solution was pretty simple, just be sure to add ‘php.ini’ the time zone where your server is located
- Search for ‘php.ini’ file in xampp/wamp etc
- After opening ‘php.ini’ using ‘Ctrl+F’ search for [Date]
- I added the line bellow ‘date.timezone = “Asia/Karachi”’
After restarting apache the problem solved ![]()



