I am using the following on all my index.php
files to include a global footer:
<?php include($_SERVER['DOCUMENT_ROOT'].'/_footer.php'); ?>
The _footer.php file itself doesn't have much content apart from the PHP to return the current year:
<div class="footer">
<p id="left">Company Address</p>
<p id="right">Copyright <?php echo date("Y"); ?> Company Incorporated</p>
</div>
</div> <!-- end .wrapper -->
</body>
</html>
While the above code works when uploaded to the web server, it does not work in my localhost (Mac OS X with Coda 2) and I get the error message:
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 'GMT/0.0/NO DST' INSTEAD IN /USERS/USER/SITES/COMPANY/EXAMPLE.COM/_FOOTER.PHP ON LINE 3
I would posit that it wouldn't be such a problem to set the timezone or not (since it's a simple function designed to show the year only), but it breaks the design of the footer when local testing:
All the text (e.g. "COPYRIGHT") is meant to be inside that yellow box.
What should I do in this case?