title: CodeIgniter local timezone to GMT
body: <p>i need help with multi timezone website in codeigniter.</p>
  
  <p>config.php:</p>
  
  <pre><code>$config['time_reference'] = 'gmt';
  date_default_timezone_set('UTC');
  </code></pre>
  
  <p>now when user want to see event(website is for events) it shows dates to his timezone with <strong>gmt_to_local()</strong> function, this works fine..</p>
  
  <p>Now problem is when user want to add new event, he picks date and time, now it gets converted to timestamp:</p>
  
  <pre><code>strtotime($event_date);
  </code></pre>
  
  <p>And problem is that he picks date and time for event on his timezone, now i need to convert it to gmt, and save to db.</p>
  
  <p>Example, if user is in UP2(+2:00) and he set <strong>12-25-2012 22:30:00</strong> it will be converted to timestamp and saved in db, but it is incorrect, it should subtract 2:00 and save that timestamp to db as timestamp of <strong>12-25-2012 20:30:00</strong> (this is converted to gmt)</p>
  
  <p>Hope that you will understand.</p>
  
  <p>Any solution for this?
  Thanks.</p>