title: How to exchange time between C and Python
body: <p>I'm writing some C code that needs to embed the current time in its (binary) output file.  Later, this file will be read by some other C code (possibly compiled for different architecture) and/or some python code.  In both cases calculations may be required on the time.</p>
  
  <p>What I'd like to know is:</p>
  
  <ol>
  <li>How do I get current UTC time in C?  Is time() the write call?</li>
  <li>What format should I write this to file in?  ASN1? ISO?</li>
  <li>How do I convert to that format?</li>
  <li>How do I read that format in C and Python and convert it into something useful?</li>
  </ol>