String strValue = (String) value;
DateTimeFormatter formatter = null;
try {
boolean spaces = strValue.indexOf(' ') != -1;
formatter = ERXRestUtils.jodaLocalDateTimeFormat(spaces, context);
parsedValue = new LocalDateTime(formatter.parseDateTime(strValue));
}
catch (Throwable t) {
String msg = "Failed to parse '" + strValue + "' as a timestamp";
if (formatter != null) {
msg += " (example: " + formatter.print(new LocalDateTime()) + ")";