Hello,
I need to change the timezone to use the correct time with the function date()
Anyone known how to do this?
Change the timezone for a script
Re: Change the timezone for a script
You can use the date_default_timezone_set() function
Code: Select all
date_default_timezone_set('America/Los_Angeles');
print date("Y-m-d");
date_default_timezone_set('Europe/Brussels');
print date("Y-m-d");
Re: Change the timezone for a script
If you want to set it for all the scripts,
you can set it in php.ini
you can set it in php.ini
Code: Select all
[Date]
date.timezone = Your/Timezone