error timezone symfony on mac [closed]

0

I want to learn symfony framework. Use the documentation commands to install it on my mac and install version 2.8.28 correctly.

But when I want to run the server I get this error:

[Symfony\Component\Debug\Exception\ContextErrorException]
  Warning: date_default_timezone_get(): 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 me
  thods and you are still getting this warning, you most likely misspelled th
  e timezone identifier. We selected the timezone 'UTC' for now, but please s
  et date.timezone to select your timezone.

I have apache installed with mamp and php5, set the time zone as "America / Santiago" in the php.ini of all the versions that mamp brings and the error keeps appearing.

How can you solve it?

    
asked by daniel2017- 24.10.2017 в 18:31
source

1 answer

1

Your PHP installation does not have a defined time zone by default you can assign the time zone in the php.ini by changing the value of a time zone to:

date.timezone = 'America/Los_Angeles'

add in .htaccess or apache virtualHost:

php_value date.timezone 'America/Los_Angeles'

Another option is to use the function at the start of your code:

date_default_timezone_set('America/Los_Angeles');

'America / Los_Angeles' It's an example of a time zone you can see the list in: link

    
answered by 24.10.2017 / 22:00
source