Skip to main content
Question Protected by avpaderno
removed "Drupal" and tags from the title
Source Link
avpaderno
  • 97.9k
  • 15
  • 164
  • 284

Drupal 8 Symfony DateTime warning "It is not safe to rely on the system's timezone settings."

I'm finding the following error in my Recent Log Messagesthe Recent log messages report:

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 /var/www/drupal/drupal-8.1.1/vendor/symfony/http-foundation/Response.php).

My site does include my ownany custom module, but as far as I can see, the only date function it calls is the PHP time() functiontime().

Also, shouldn't Shouldn't Drupal handle the timezone setting?

Is there any way I can isolate where this function is getting called from?

It's not a major problem, but I'd prefer to minimise unnecessary warnings in my log.

Drupal 8 Symfony DateTime warning

I'm finding the following error in my Recent Log Messages report:

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 /var/www/drupal/drupal-8.1.1/vendor/symfony/http-foundation/Response.php).

My site does include my own custom module, but as far as I can see, the only date function it calls is the PHP time() function.

Also, shouldn't Drupal handle the timezone setting?

Is there any way I can isolate where this function is getting called from?

It's not a major problem, but I'd prefer to minimise unnecessary warnings in my log.

"It is not safe to rely on the system's timezone settings."

I'm finding the following error in the Recent log messages report:

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 /var/www/drupal/drupal-8.1.1/vendor/symfony/http-foundation/Response.php).

My site does include any custom module, but as far as I can see, the only date function it calls is time(). Shouldn't Drupal handle the timezone setting?

Is there any way I can isolate where this function is getting called from?

It's not a major problem, but I'd prefer to minimise unnecessary warnings in my log.

Tweeted twitter.com/StackDrupal/status/856396052542480388
Source Link
James Shields
  • 934
  • 1
  • 9
  • 24

Drupal 8 Symfony DateTime warning

I'm finding the following error in my Recent Log Messages report:

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 /var/www/drupal/drupal-8.1.1/vendor/symfony/http-foundation/Response.php).

My site does include my own custom module, but as far as I can see, the only date function it calls is the PHP time() function.

Also, shouldn't Drupal handle the timezone setting?

Is there any way I can isolate where this function is getting called from?

It's not a major problem, but I'd prefer to minimise unnecessary warnings in my log.