HHH-10399 - Add support for specifying TimeZone for ZonedDateTime type

Fix test failing in TimeZones with negative offsets
This commit is contained in:
Vlad Mihalcea 2016-09-15 08:27:59 +03:00
parent 81aba17771
commit 6f43d40e0a
1 changed files with 5 additions and 1 deletions

View File

@ -10,6 +10,7 @@ import java.sql.PreparedStatement;
import java.sql.SQLException;
import java.sql.Time;
import java.util.Map;
import java.util.concurrent.TimeUnit;
import javax.persistence.Entity;
import javax.persistence.Id;
@ -79,7 +80,10 @@ public class JdbcTimeDefaultTimeZoneTest
doInHibernate( this::sessionFactory, s -> {
Person person = s.find( Person.class, 1L );
assertEquals( 0, person.createdOn.getTime() );
assertEquals(
0,
person.createdOn.getTime() % TimeUnit.DAYS.toSeconds( 1 )
);
} );
}