title: C# string to DateTime with timezone
body: <p>I want to format the string : "2012-04-20 10:10:00+0200" to a dateTime with this format.
  so I think it must be "yyyy-MM-dd hh:mm:ss zzz"? </p>
  
  <p>when I tried this </p>
  
  <pre><code>   // starttime =  {20/04/2012 10:10:00} without my +0200!
  DateTime starttime = Convert.ToDateTime("2012-04-20 10:10:00+0200",CultureInfo.CurrentCulture);
  // And this gave me a format exception : {System.FormatException: String was not recognized as a valid DateTime.
          DateTime result = DateTime.ParseExact("2012-04-20 10:10:00+0200", "yyyy-MM-dd hh:mm:ss zzz", CultureInfo.InvariantCulture);
  </code></pre>
  
  <p>SOLUTION GIVEN BY "V4Vendetta" :</p>
  
  <p>You should try using DateTimeOffset instead of the DateTime</p>
  
  <pre><code>DateTimeOffset result = DateTimeOffset.Parse("2012-04-20 10:10:00+0200",CultureInfo.InvariantCulture);
  </code></pre>
  
  <p>Here you get the Offset (2 hrs) too which could be computed with your DateTime (10:10) value and get your desired out put (result.DateTime + result.Offset)</p>