title: AWK Converting a "long date" to datetime
body: <p>I tried to find the answer on here and other sources but I'm at a loss. I'm building a little tiny awk-tool to use with the console based twitter client twidge (<a href="https://github.com/jgoerzen/twidge/wiki" rel="nofollow">https://github.com/jgoerzen/twidge/wiki</a>‎)</p>
  
  <p>From the output of the incoming tweets I want to do various cool stuff but for the data to be useful I need to first get the timestamp into a format I can handle.</p>
  
  <p>For reference, Here's the output I'm currently getting with the command</p>
  
  <p>Code</p>
  
  <pre><code>twidge lsrecent -l | gawk -F"\t" '{print "@"$2 ": " $4 " ("$5")"}'
  </code></pre>
  
  <p>Output</p>
  
  <pre><code>@nytimes: China Cuts Ties With North Korean Bank http://t.co/N3iljjgGbH (Tue May 07 12:57:04 +0000 2013)
  </code></pre>
  
  <p>Then I tried to be clever and did this</p>
  
  <p>Code</p>
  
  <pre><code>twidge lsrecent -l | gawk -F"\t" '{print "@"$2 ": " $4 " ("strftime("%Y-%m-%d %T",$5)")"}'
  </code></pre>
  
  <p>But got this unfortunate output</p>
  
  <pre><code>@BloombergNews: HSBC posts bigger-than-estimated increase in first-quarter profit | http://t.co/QraWonRU32 (1970-01-01 01:00:00)
  </code></pre>
  
  <p>As we can see, the date conversion was not as hoped. Any pointers most welcome. It doesn't have to be awk/gawk it's just a preference. Ultimately the data will be put into a database and worked on there.</p>
  
  <p>Thanks!</p>
  
  <p>Martin</p>