420421422423424425426427428429430
modelObject = changeTimeZone(modelObject, zone); } MutableDateTime mDate = new MutableDateTime(modelObject); date = mDate.toDate(); if (use12HourFormat) { int hourOfHalfDay = mDate.get(DateTimeFieldType.hourOfHalfday()); hours = hourOfHalfDay == 0 ? 12 : hourOfHalfDay;
304305306307308309310311312313314
{ date.set(DateTimeFieldType.halfdayOfDay(), 0); } // the date will be in the server's timezone setConvertedInput(date.toDate()); } catch (RuntimeException e) { DateTimeField.this.error(e.getMessage()); invalid();
116117118119120121122123124125126
{ throw new ConversionException(e); } // apply the server time zone to the parsed value dt.setZone(getTimeZone()); return dt.toDate(); } else { try {
8990919293949596979899
} // parse date retaining the time of the submission format.parseInto(dt, value, 0); // apply the server time zone to the parsed value dt.setZone(getTimeZone()); return dt.toDate(); } else { return format.parseDateTime(value).toDate(); }
305306307308309310311312313314315
125126127128129130131132133134135