title: Can't insert a Date object into a PostgreSQL Timestamp column using Hibernate
body: <p>I am trying to use the primefaces schedule component, I found problem in inserting the date () in the database (<code>postgresql</code>), there is a problem of incompatibility between the date type of java and timestamp postgres that I can not seem to solve:</p>
  
  <pre><code>org.hibernate.exception.DataException nested exception is: 
  ERROR: invalid input syntax for type timestamp : 
      "16:00:00.747000 +00:00:00"
  </code></pre>
  
  <p>here is the function I tested the insertion in the database :</p>
  
  <pre><code>@Test
  public void testEdit() {
      Event event = new Event(); 
      Calendar t = (Calendar) today().clone();   
      t.set(Calendar.AM_PM, Calendar.PM);  
      t.set(Calendar.DATE, t.get(Calendar.DATE) + 4);  
      t.set(Calendar.HOUR, 4); 
      event.setStartDate(t.getTime());
      sessionService.save(event);
  }
  </code></pre>