title: DateTime Parse ANSI C timestamp
body: <p>I am trying to parse Date/Time formats in HTTP/1.1 headers as specified in <a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3" rel="nofollow">RFC2616</a></p>
  
  <p>How do I parse an ANSI C timestamp in C#?<br>
  The closest I get is:</p>
  
  <pre><code>string dateFormat = "ddd MMM d HH':'mm':'ss yyyy";
  DateTime time = DateTime.ParseExact("Mon Jan  2 15:04:05 2006", dateFormat, CultureInfo.InvariantCulture);
  </code></pre>
  
  <p>The problem lies in "d" which does not accept a leading space in case it is a single digit date. And "dd" requires a leading 0 instead.</p>
  
  <p>Is there any easy way around, or maybe a library that already handles the three allowed date/time formats in HTTP/1.1?</p>