Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialUnsubscribed User
48,988 PointsError with footer.php date object ??
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.
No idea what they mean should i use another method ?
2 Answers
raj bansal
Courses Plus Student 577 PointsYou can try default date function and it work just fine even in our localhost.
<?php echo date("Y");?>
Bob McCarty
Courses Plus Student 16,618 PointsJens,
I don't have enough context to provide an answer. I have the following working.
<footer>
<p>© <?php bloginfo('name'); echo ' '; echo date('Y'); ?></p>
</footer>
Bob
Unsubscribed User
48,988 PointsMmmh i think this is wrong :-(
<?php date_default_timezone_set('UTC'); echo date('jS \of F Y h:i:s A'); ?>
worked.
The date(); method seems to be not allowed without "default", but thanks.