title: PHP - How to Reformat ISO 8601 Date String to user defined Timezone
body: <p>I have provided date/time in this format: 2012-10-14T06:00</p>
  
  <p>I can rework the data like this: 6:00am using</p>
  
  <pre><code>&lt;?php
  function formatDate($date, $format){
      $output = date($format, strtotime($date));
      return $output;
  }
  ?&gt;
  
  &lt;?php echo formatDate('2012-10-14T06:00', 'g:ia'); ?&gt;
  </code></pre>
  
  <p>Outputs: 6:00am</p>
  
  <p>Which is great, but how can i adjust the offset using </p>
  
  <p>date_default_timezone_set('America/Los_Angeles');</p>
  
  <p>or </p>
  
  <p>date_default_timezone_set('Europe/Amsterdam);</p>
  
  <p>Which is set to the users timezone (whatever they choose) - the time should be offset between the orginal timezone data and the user provided ('Europe/Amsterdam)</p>
  
  <p>So if they set their default timezone to a different country the time would read 8:00am or 4:00am depending on that timezone offset.</p>
  
  <p>The base timezone will always be in XXXX-XX-XXTXX:XX   format.</p>
  
  <p>Any help would greatly be appreciated</p>