title: How can I do a insert a new Date with Spring Data MongoDB?
body: <p>How can I insert new Date with Spring Data MongoDB?</p>
  
  <p>I'm currently resorting to </p>
  
  <pre><code>User = new User();
  user.setCreationDate(new Date());
  mongoOperation.save(user);
  </code></pre>
  
  <p>to solve the problem, but the end result is that a user is saved with the current time of the server that is running the code, instead of the current time of the server that is running the database.</p>
  
  <p>Since this code will run in several instances on several servers in parallel, and the servers might have slightly different times, I'd like to replicate the exact same behaviour I would get from doing a</p>
  
  <pre><code>db.users.insert({'creationDate': new ISODate()}) 
  </code></pre>
  
  <p>diretly in the mongo shell.</p>
  
  <p>How can this be achieved with Sprint-Data-MongoDB?</p>