import org.hibernate.type.DateType; | |
public class UtcDateType extends DateType { | |
private static final TimeZone UTC = TimeZone.getTimeZone("UTC"); | |
@Override | |
public Object get(ResultSet rs, String name) throws SQLException { | |
return rs.getDate(name, Calendar.getInstance(UTC)); | |
} | |
@Override | |
public void set(PreparedStatement st, Object value, int index) throws SQLException{...} | |
... | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment