Hi,
My application deals with the dates based on a custom time zone. We needed one without day light savings. So we set the default time zone to the custom time zone. Our database uses the default timezone. Now when I persist, I face problem with some columns alone. Especially when I use
Code:
new Date()
.
Below is the mapping I use
<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC
"-//Hibernate/Hibernate Mapping DTD 2.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd">
Code:
<hibernate-mapping>
<class name="com.nielsenmedia.myevnts.entity.CableLineup" table="Lineup"
dynamic-update="true" dynamic-insert="true" >
<id name="seqID" type="long" column="seqID" unsaved-value="any">
<generator class="assigned"/>
</id>
<version name="changedDateTime" type="timestamp"
column="changedDateTime" />
<property name="startDateTime" type="java.util.Date"
update="true" insert="true" column="startDateTime"
not-null="true" />
</class>
</hibernate-mapping>
Now when I persist startDateTime is getting persisted as I give. But the changedDateTime is short of one hour.
Any help?