I used to use java.util.Calendar and java.util.Date, but now I´m facing a convert problem that I don't undestand. Every date that a work persists righ at the database but in the application miss 2 days.
My system uses Java8 Hibernate 5.2 MS SQL 2008
Actualy I'm using Calendar but it's the same problem with Date and LocalDate and LocaDateTime. There's any knwoing bug?
My Persistence
<?xml version="1.0" encoding="UTF-8"?> <persistence version="1.0" xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd"> <persistence-unit name="GEREVD" transaction-type="RESOURCE_LOCAL"> <provider>org.hibernate.jpa.HibernatePersistenceProvider</provider> <class>kmsimplecode.model.Log</class> <properties> <property name="javax.persistence.jdbc.driver" value="com.microsoft.sqlserver.jdbc.SQLServerDriver"/> <property name="hibernate.dialect" value="org.hibernate.dialect.SQLServer2008Dialect"/> <property name="hibernate.hbm2ddl.auto" value="update"/> <property name="javax.persistence.jdbc.url" value="jdbc:sqlserver://server;databaseName=database"/> <property name="javax.persistence.jdbc.user" value="sa"/> <property name="javax.persistence.jdbc.password" value="pass"/> <property name="hibernate.enable_lazy_load_no_trans" value="true"/> </properties> </persistence-unit> </persistence> 

