title: JSON datetime between bash script and JavaScript
body: <p>In the same spirit as discussed <a href="https://stackoverflow.com/questions/455580/json-datetime-between-python-and-javascript/2680060#2680060">here</a>, is there a recommended way to generate / parse dates from within a bash script so that it can be interfaced to Javascript <code>Date</code>?</p>
  
  <p>To be precise, I get this strings when doing json encoding of a Javascript Date object:</p>
  
  <pre><code>2011-10-31T10:23:47.278Z
  </code></pre>
  
  <p>I could put together a bash hack to generate / parse that date format, but I would prefer to avoid reinventing the wheel. Does somebody have a working solution?</p>
  
  <p>I am more interested in the "generating" side: I want to generate current dates from a bash script and save them in a json document (couchdb) so that they can be automatically ordered by the view engine.</p>