* doesUserFullfillEndEntityProfile check and this is what need to upgrade from:
* DateFormat.getDateTimeInstance(DateFormat.MEDIUM, DateFormat.SHORT, Locale.US)
*/
if (getVersion() < 13) {
final DateFormat oldDateFormat = DateFormat.getDateTimeInstance(DateFormat.MEDIUM, DateFormat.SHORT, Locale.US);
final FastDateFormat newDateFormat = FastDateFormat.getInstance("yyyy-MM-dd HH:mm");
try {
final String oldStartTime = getValue(STARTTIME, 0);
if (!isEmptyOrRelative(oldStartTime)) {
// We use an absolute time format, so we need to upgrade
final String newStartTime = newDateFormat.format(oldDateFormat.parse(oldStartTime));
setValue(STARTTIME, 0, newStartTime);
if (log.isDebugEnabled()) {
log.debug("Upgraded " + STARTTIME + " from \"" + oldStartTime + "\" to \"" + newStartTime + "\" in EndEntityProfile.");
}
}
} catch (ParseException e) {
log.error("Unable to upgrade " + STARTTIME + " in EndEntityProfile! Manual interaction is required (edit and verify).", e);
}
try {
final String oldEndTime = getValue(ENDTIME, 0);
if (!isEmptyOrRelative(oldEndTime)) {
// We use an absolute time format, so we need to upgrade
final String newEndTime = newDateFormat.format(oldDateFormat.parse(oldEndTime));
setValue(ENDTIME, 0, newEndTime);
if (log.isDebugEnabled()) {
log.debug("Upgraded " + ENDTIME + " from \"" + oldEndTime + "\" to \"" + newEndTime + "\" in EndEntityProfile.");
}
}