I am trying to use the primefaces schedule component, I found problem in inserting the date () in the database (postgresql
), there is a problem of incompatibility between the date type of java and timestamp postgres that I can not seem to solve:
org.hibernate.exception.DataException nested exception is:
ERROR: invalid input syntax for type timestamp :
"16:00:00.747000 +00:00:00"
here is the function I tested the insertion in the database :
@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);
}