Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
import org.hibernate.type.DateType;
public class UtcDateType extends DateType {
private static final TimeZone UTC = TimeZone.getTimeZone("UTC");
public Object get(ResultSet rs, String name) throws SQLException {
return rs.getDate(name, Calendar.getInstance(UTC));
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