title: How to insert the same date in mongodb as read from String through java?
body: <p>I have a text file(CSV) with data in it from MySQL it has many fields and one of the fields is <code>DateOfTransaction</code> with value like this <code>"21/08/2012"</code>.
  I have written a java program to read the CSV file and insert the document in mongodb.
  code to insert date </p>
  
  <pre><code>    SimpleDateFormat formatter = new SimpleDateFormat("dd/MM/yyyy"); //set the date format
      Date d2 = new SimpleDateFormat("dd/mm/yyyy").parse(arr[10]);
      bookRenterLineItemInstance.setDateoftransaction(d2.getTime());
  </code></pre>
  
  <p>Every thing is fine in parsing adn dateobject iscorrectly created.
  But when i query the mongodb collection it give me record with one day behind.</p>
  
  <p>example if i insert date : <code>"21/08/2012"</code></p>
  
  <p>saved in mongodb as :  <code>"DateOfTransaction" : ISODate("2012-01-20T18:38:00Z")</code></p>
  
  <p>All my queries are related to this field.
  Please help so that the date is not changed and saved as <code>ISODate("2012-01-21T18:38:00Z")</code> for <code>"21/08/2012"</code></p>