PHP Timezone Strict Standards

In PHP5 working with Error Reporting on E_STRICT you need to set the default timezone or you will get a Strict Standards Error:

It is not safe to rely on the system's timezone settings. Please use the date.timezone setting, the TZ environment variable 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.

This is a simple fix, just set the Default Time Zone at the top of the page:

PHP:
  1. date_default_timezone_set('America/Los_Angeles');

These icons link to social bookmarking sites where readers can share and discover new web pages.
  • Digg
  • del.icio.us
  • Netvouz
  • DZone
  • Reddit
  • Furl
  • NewsVine
  • Simpy
  • Slashdot
  • Spurl
  • StumbleUpon
  • YahooMyWeb
  • TailRank

Home | PHP | PHP Timezone Strict Standards