title: JPA @Past Date/Calendar validation
body: <p>In a spring-boot based project i have a simple DTO object:</p>
  
  <pre><code>public class ExpenseDTO {
  
      @Min(value = 1, message = "expense.amount.negative")
      private int amount;
  
      @Past
      private Calendar createdAt;
  
      // setters/getters/constructor are omitted
  }
  </code></pre>
  
  <p>and such rest controller:</p>
  
  <pre><code>public class ExpenseController {
  
  private final ExpenseService expenseService;
  
      @Autowired
      public ExpenseController(ExpenseService expenseService) {
          this.expenseService = expenseService;
      }
  
      @RequestMapping(value = ADD_EXPENSE, method = POST)
      public ResponseEntity addExpense(@Valid @RequestBody ExpenseDTO expenseDTO, Principal principal) {
          expenseService.addExpense(expenseDTO, principal.getName());
          return ResponseEntity.ok().build();
      }
  }
  </code></pre>
  
  <p>From a client i'm gonna send a current date: {"createdAt": "2017-01-27T21:32:19.183Z"} but during validation on the back end the date will be parsed as "2017-01-28T01:30:00.000+0200" so the result is wrong and validation fails. I was trying to play around with @JsonFormat but with no result.</p>
  
  <p>NOTE: i'm using H2 db and if remove @Past from the DTO object everything works just fine, but i have to disable future date.</p>
  
  <p>So how can i validate the date without timezone, i mean i need the exactly the same date on the back end as it was send from a client?!</p>