date.timezone = "Europe/Paris"
Put this in your php.ini file with the appropriate time zone from here , and then restart your HTTP server.
If you do not want to install it globally, but want to install it based on script -by-script, use this code on every page where the date / time function is used:
date_default_timezone_set('America/Los_Angeles');
Like the global time zone, select your time zone from here .
source
share