title: What format does the highcharts js library accept for dates?
body: <p>I am using highcharts and cannot figure out what the date input should be from rails dates to the highcharts accepted format for dates.</p>
  
  <p>In my migration file i am storing the date like this:</p>
  
  <pre><code>t.date :consumption_date
  </code></pre>
  
  <p>The value gets stored in this format "2012-03-25", and going to the terminal and finding the record i get this:</p>
  
  <pre><code>=&gt;  Sat, 31 Mar 2012
  </code></pre>
  
  <p>When the chart renders, the individual points display <b>Invalid date</b>. The following array gets output to highcharts to render</p>
  
  <pre><code>[[Sun, 25 Mar 2012, 1158], [Sat, 31 Mar 2012, 1200]]
  </code></pre>
  
  <p>The format that highcharts uses in one of their demo charts, when the data is submitted in jquery is of the form:</p>
  
  <pre><code>[[Date.UTC(1970,  9, 27), 0   ], [Date.UTC(1970, 10, 10), 0.6 ]]
  </code></pre>
  
  <p>How can i get rid of the invalid date, by submitting the correct date format to highcharts. </p>