title: MongoDB - Store millisecond instead of Date
body: <p>I'm using PHP as server side language. I'm getting date in millisecond from my ajax request and converted it into MongoDate, then i store it into MongoDB. Like below.</p>
  
  <pre><code>$date = new MongoDate($millisecond / 1000);
  $db-&gt;test-&gt;insert({"date": $date});
  </code></pre>
  
  <p>Again, when i need date in my javascript, i'm getting MongoDate and and converted into millisecond and i pass it to my UI. Like below</p>
  
  <pre><code>foreach($cursor as $row) {
      $row["date"] = $row["date"]-&gt;sec * 1000;
  }
  </code></pre>
  
  <p>Instead, why should i not store date as millisecond instead of Dateobject? Still i can compare two dates, even-though i store it as millisecond. </p>
  
  <p>Any other disadvantages would i face in future, while i do reports with date as millisecond?</p>