title: MongoRepository findByCreatedAtBetween not returning accurate results
body: <p>My document structure in Mongo is like this : </p>
  
  <p>db.user.find()</p>
  
  <pre><code>{
          "_id" : ObjectId("560fa46930a8e74be720009a"),
          "createdAt" : ISODate("2015-10-03T09:47:56.333Z"),
          "message" : "welcome",
  }
  {
              "_id" : ObjectId("560fa46930a8e723e720009a"),
              "createdAt" : ISODate("2015-10-03T09:48:25.048Z"),
              "message" : "thank you"
  }
  </code></pre>
  
  <p>When I use the below query in my Mongo Shell to find documents between two given timestamps, i get the right result : </p>
  
  <pre><code>db.user.find({createdAt:{$gte:ISODate("2015-10-03T09:40:25.048Z"),$lte:ISODate("2015-10-03T09:50:56.333Z")}})
  </code></pre>
  
  <p>I am using MongoRepository with Spring in my REST service to work with the Java driver. Below is the user repository: </p>
  
  <pre><code>public interface UserRepository extends MongoRepository&lt;User, String&gt; 
  {
         ArrayList&lt;User&gt; findbyCreatedAtBetween(Date d1, Date d2);
  
  }
  </code></pre>
  
  <p>When I call make the following call in my service, it does not return any result
  <code>userRepository.findbyCreatedAtBetween(2015-10-03T09:40:25.048Z, 2015-10-03T09:50:29.006Z)</code> </p>
  
  <p>However it returns the result when I give d1 as previous day :
      userRepository.findbyCreatedAtBetween(2015-10-02T09:40:25.048Z, 2015-10-03T09:50:29.006Z)</p>
  
  <p>Any ideas on how I can resolve this? Please help!</p>