0
votes

First of all here is my php.ini configuration regarding date:

 [Date]
 date.timezone = 'America/Sao_Paulo'

When i get ini_get('date.timezone') it fives me the following America/Sao_paulo (Notice the lowercase P)

I have the following error everytime i use 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 'America/Sao_Paulo' for 'BRT/-3.0/no DST'

If i use

date_default_timezone_set('America/Sao_Paulo'); 

Everything goes fine so i guess something is screwing my timezone configuration.

1

1 Answers

0
votes

Are you sure you are setting it in the correct php.ini?

Call phpinfo() and make sure you are modifying the ini file listed under "Loaded Configuration File"

Edit: While you are looking at phpinfo() you can also see if the timezone is actually being set by looking under Date->Default timezone