title: Setting timezone offset in PHP
body: <p>I'm writing an API that will retrieve readings from a sensor and return a list of times and values, <em>offset using Javascript's `new Date().</em> (see below for the reason) </p>
  
  <p>I've been able to get the time addition / subtraction working well enough, using <code>$date-&gt;sub(DateInterval::createFromDateString($offset . " minutes"))</code>, but the time and date returned have an offset of +00:00 (e.g. <code>2016-02-26T13:32:28+00:00</code> instead of <code>2016-02-26T13:32:28+11:00</code> for Australia). </p>
  
  <p>This causes issues for things like the Pebble, or AngularJS, which apply their own offsets on top of my own, after seeing that the offset is +00:00</p>
  
  <p>How can I correctly set an offset when calling <code>$date-&gt;format("c")</code>? Should I compile the date myself (e.g. <code>$date-&gt;format("Y-m-d\TH:i:s" . $plusOrMinus . $myoffset-&gt;format("h:i"))</code>) or is there a better way to do it?</p>
  
  <p>EDIT: Due to platform limitations (e.g. the Pebble smartwatch) I can't, or don't want to, use timezone names, as implementing a timezone menu in my watch app would either break UX or drive the filesize up if I add an offset to timezone table / library</p>