0

can somebody or someone teach me how to deal this warning:

Warning: date() [function.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 'UTC' for '8.0/no DST' instead in C:\xampp\htdocs\folder\index.php.
(current date here)


i just use this code to print our the current date on my html:

<div class="divdate">
<?php echo date('l F j,Y'); ?>
</div>

2
Contributors
2
Replies
5
Views
6 Years
Discussion Span
Last Post by decade
0

This issue can be resolved by setting a default timezone in your PHP.INI. This error most often occurs after your server's PHP version has been upgraded. A newer version of PHP expects something like the following:

date.timezone = Europe/Amsterdam
Votes + Comments
helpful post
1

yeah but I already fix my problem a minute after I post my problem. by using the code

date_default_timezone_set('UTC');

.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.