title: How to format a datetime to GMT irrespective of regional settings?
body: <p>I have a datetime stored in the database as GMT. I need to format this datetime as a string together with the timezone offset to UTC, for example:</p>
  
  <pre><code>DateTime date = DateTime.Parse("2012-03-15 12:49:23");
  string dateAsString = date.ToString("yyyy-MM-ddTHH:mm:ss.fffzzz");
  </code></pre>
  
  <p>2012-03-15T12:49:23.000+00:00</p>
  
  <p>This code works on my machine in the UK. When I change my regional settings to a different time zone, for example Perth, I get the following output:</p>
  
  <p>2012-03-15T12:49:23.000+08:00</p>
  
  <p>I need the string output to always represent the time in GMT.</p>