title: How to parse values from a C string into a struct timespec
body: <p>My program will be receiving C string input in the format of <code>Wed, 21 Oct 2015 07:28:00 GMT</code>, e.g.</p>
  <pre><code>char * date = &quot;Wed, 21 Oct 2015 07:28:00 GMT&quot;
  </code></pre>
  <p>How to convert this into a struct timespec so I can compare with the st_atim, st_mtim, and st_ctim <code>struct timespec</code>'s returned from the stat() function?</p>
  <p><a href="https://stackoverflow.com/questions/2722606/how-to-parse-a-string-into-a-datetime-struct-in-c">This post</a> talks about strptime and sscanf, and I also found <code>strftime</code>, but all these convert to a <code>struct time_t</code> or <code>struct tm</code> or integer values.</p>