title: Using strftime in C, how can I format time exactly like a Unix timestamp?
body: <p>Here's the sort of time formatting I'm after:</p>
  
  <pre><code>2009-10-08 04:31:33.918700000 -0500
  </code></pre>
  
  <p>I'm currently using this:</p>
  
  <pre><code>strftime(buf, sizeof(buf), "%Y-%m-%d %H:%M:%S %Z", ts);
  </code></pre>
  
  <p>Which gives:</p>
  
  <pre><code>2009-10-11 13:42:57 CDT
  </code></pre>
  
  <p>Which is close, but not exact. I can't seem to find anything on displaying <code>-0500</code> at the end. Plus I'm getting the seconds as an int.</p>
  
  <p>How can I resolve these two issues?</p>