class HerdDateUtils extends DateUtils {

    public static Timestamp resetTimeToMidnight(XMLGregorianCalendar xmlGregorianCalendar)
    {
        Date date = xmlGregorianCalendar.toGregorianCalendar().getTime();
        return new Timestamp(DateUtils.truncate(date, Calendar.DATE).getTime());
    }

}