# date.timezone



## balanga (Feb 16, 2017)

When installing Drupal I get the following error msg


```
Warning: DateTime::createFromFormat(): 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 the timezone 'UTC' for now, but please set date.timezone to select your timezone. in Symfony\Component\HttpFoundation\Response->sendHeaders() (line 331 of vendor/symfony/http-foundation/Response.php).
Symfony\Component\HttpFoundation\Response->sendHeaders() (Line: 371)
Symfony\Component\HttpFoundation\Response->send() (Line: 637)
install_run_task(Array, Array) (Line: 538)
install_run_tasks(Array) (Line: 115)
install_drupal(Object) (Line: 44)
```

Does this refer to the timezone used by FreeBSD or is it something within php?. I know timezone is set on installation but where is the value held?


According to `phpinfo()`

Timezone Database        internal
Default timezone            UTC

date.timezone                _no value_ _no value_


----------



## julp (Feb 16, 2017)

No, it's relative to the PHP setting date.timezone you've found (see the _no value_ which bothers him) and which is independant to the system.

Just define it in your php.ini (/usr/local/etc/php.ini) to silent this warning.

Note: since PHP 7.0.0, undefined date.timezone quietly fallbacks to UTC


----------

