title: Fatal error: Uncaught exception 'Exception' with message 'DateTimeZone
body: <p>I'm using this code:</p>
  
  <pre><code>$dtzone = @new DateTimeZone($this-&gt;session-&gt;userdata('timezone'));
  $time =  date('r',$this-&gt;session-&gt;userdata('old_last_login'));
  $dtime = new DateTime($time);
  @$dtime-&gt;setTimeZone($dtzone);
  </code></pre>
  
  <p>It works ok in all browsers except in Firefox where I get message:</p>
  
  <pre><code>Fatal error: Uncaught exception 'Exception' with message 'DateTimeZone::__construct() 
  [&lt;a href='datetimezone.--construct'&gt;datetimezone.--construct&lt;/a&gt;]: Unknown or bad timezone ()' 
  in /home/example.loc/public_html/application/views/_partials/top.php:7 Stack trace: #0
  /home/example.loc/public_html/application/views/_partials/top.php(7): DateTimeZone-&gt;__construct('') ...
  </code></pre>
  
  <p>Seems this is the most important part of the error message: <strong>Unknown or bad timezone ()</strong></p>
  
  <p>I don't understand why its ok in all browsers and why it doesn't work in Firefox.</p>
  
  <p>Timezone is set. e.g. to : <strong>America/Montevideo</strong></p>
  
  <p>To me it seems that firefox store cookie in some invalid format because when I change code to this:</p>
  
  <pre><code>$dtzone = @new DateTimeZone('America/Montevideo');
  </code></pre>
  
  <p>it works.</p>