title: How to handle dates in Backbone?
body: <p>I store dates in the DATETIME format in a MySQL database. When a model is fetched from the database, dates (in the DATETIME format) are converted to date objects in the model's <em>initialize</em> method. So far so good.</p>
  
  <p>When the model is saved to the server, the date objects need to be converted back to the DATETIME format in order for the server side code to interpret the dates correctly. I have used all sorts of hackery to do this, but I wonder <strong>at what stage can of the model's <em>save</em> method can I safely convert the dates to the DATETIME format?</strong></p>
  
  <p>One approach is to do the following:</p>
  
  <pre><code>this.model.save({
      date : date.toDateTime()
  }, options);
  </code></pre>
  
  <p>However, this causes a change event to be fired since the attributes hash before the save method is not the same as the hash after the save event (and this triggers Backbone's set method).</p>