title: Inserting a date in mongodb
body: <p>I want to insert a date into a collection.
  I use the class <code>MongoDate</code> to create the date object:</p>
  
  <pre><code>$today = new MongoDate(strtotime(date('Y-m-d 00:00:00')));
  </code></pre>
  
  <p>The problem is that once it is in my collection the date is 2 hours earlier.</p>
  
  <p>For instance, <code>$today</code> here should be <code>2013-05-28 00:00:00</code> but once in the database it is <code>2013-05-27 22:00:00</code>.</p>
  
  <p>I can't resolve this problem by adding 2 hours manually to the timestamp because I use the date in queries.</p>
  
  <p>The local time of the server where Mongo is running is set to the correct time of my country.</p>