I am using PHP Codeigniter framework for my website development, I am getting this error
A PHP Error was encountered
Severity: Warning
Message: 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.
I need to solve this problem. Please help me.
Thanks for asking the question here. I hope you get the positive result from here.
You need to set date_default_timezone_set(“”)
For example:
date_default_timezone_set("Asia/Kolkata");
If you print records for MySql using date format, so apply this
<?php date_default_timezone_set("Asia/Kolkata"); echo date('d M, Y', strtotime($pdata->post_created)); ?>