title: how to convert timestamp to date in codeigniter
body: <p>I want to convert <code>1373892900000</code> to <code>Monday 2013/07/15 8:55 AM</code> in Codeigniter.</p>
  
  <p>However, I keep receiving a totally different result by converting the timestamp using the function i have written, please note:<em>I need to change the dates according to different timezones, that is why I want to write it this way</em>:</p>
  
  <pre><code>public function time_convert($timestamp){
  
          $this-&gt;load-&gt;helper('date');
  
          date_default_timezone_set('UTC');
  
          $daylight_saving = TRUE;
          $timezone = "UM4"; //toronto or new york timezone
          $time = gmt_to_local($timestamp, $timezone, $daylight_saving);
  
          $final_time = standard_date('DATE_RFC822', $time);  
          return $final_time;
  
      }
  </code></pre>
  
  <p>Result from the above function is: <code>Sat, 08 Dec 06 01:40:00 +0000</code></p>
  
  <p>And if I don't put  <code>date_default_timezone_set('UTC');</code> in the above function, I get this date instead <code>Sat, 08 Dec 06 02:40:00 +0100</code>. My codeigniter seems to default the timezone to Europe/Berlin.</p>
  
  <p>Can anyone please help me correct any of the mistakes I might have made?</p>