title: Symfony 2.7: default timezone not set, causing fatal error
body: <p>I'm trying to set up a <strong>symfony 2.7</strong> based app on a <strong>shared server</strong> and have <strong>no permission</strong> to change the <strong>php.ini</strong>.</p>
  
  <p>Executing: <code>php app/console doctrine:schema:drop --force</code></p>
  
  <p>Outputs this warnings/errors:</p>
  
  <pre><code>PHP Warning:  Uncaught exception 'Symfony\Component\Debug\Exception\ContextErrorException' with message '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 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.'
  0 [internal function]: Symfony\Component\Debug\ErrorHandler-    &gt;handleError(2, 'date_default_ti...', '/path...', 272, Array)
  1 /domain.com/app/vendor/monolog/monolog/src/Monolog/Logger.php(272): date_default_timezone_get()
  2 /domain.com/app/vendor/monolog/monolog/src/Monolog/Logger.php(481): Monolog\Logger-&gt;addRecord(100, 'Notified event ...', Array)
  3 /domain.com/app/vendor/symfony/ in /domain.com/app/vendor/monolog/monolog/src/Monolog/Logger.php on line 272
  PHP Fatal error:  date_default_timezone_get(): Timezone database is corrupt - this should *never* happen! in /domain.com/app/vendor/monolog/monolog/src/Monolog/Logger.php on line 272
  PHP 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 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 /domain.com/app/vendor/monolog/monolog/src/Monolog/Logger.php on line 272
  PHP Fatal error:  date_default_timezone_get(): Timezone database is corrupt - this should *never* happen! in /domain.com
  </code></pre>
  
  <p>I tried <a href="https://stackoverflow.com/questions/20743060/symfony2-and-date-default-timezone-get-it-is-not-safe-to-rely-on-the-system">this</a>:</p>
  
  <pre><code>class AppKernel extends Kernel
  {
      public function init()
      {
          date_default_timezone_set( 'Europe/Berlin' );
          parent::init();
      }
  }
  </code></pre>
  
  <p>Outputs the next error:</p>
  
  <pre><code>PHP Fatal error:  Uncaught exception 'Symfony\Component\Debug\Exception\ContextErrorException' with message 'Notice: date_default_timezone_set(): Timezone ID 'Europe/Berlin' is invalid' in /domain.com/app/app/AppKernel.php:42
  </code></pre>
  
  <p>According to <a href="http://php.net/manual/de/timezones.europe.php" rel="nofollow noreferrer">php.net</a> <code>Europe/Berlin</code> is a valid identifier.</p>
  
  <p>According to <a href="https://stackoverflow.com/questions/8762608/setting-default-timezone-does-not-work-despite-timezone-being-valid">this answer</a> <code>timezonedb.so</code> should be installed (it's not). </p>
  
  <p>According to <a href="http://symfony.com/legacy/doc/reference/1_4/en/04-Settings#chapter_04_sub_default_timezone" rel="nofollow noreferrer">Symfony 1.4 docs</a> it's possible to set <code>default_timezone</code> in the <code>settings.yml</code>. I cannot find a similar config for <code>&gt;= 2.0</code>. 
  <strong>Edit</strong>: <em>"Unlike Symfony 1.4, there isn’t a default_timezone config parameter to set the default timezone in Symfony2. [...]"</em> (<a href="http://dploy.in/2012/setting-the-default-timezone-symfony2/" rel="nofollow noreferrer">source</a>)</p>
  
  <p>Any ideas, how to solve the problem?</p>
  
  <p>Thanks in advance!</p>