1
0
Fork 0

Merge pull request #109 from IHTSDO/upstream

Deserialize full datetime when available
master
Bob Carroll 2015-09-20 18:29:59 -07:00
commit 1c27ab609c
1 changed files with 5 additions and 1 deletions

View File

@ -504,8 +504,12 @@ public final class Field {
if (value instanceof Date || value == null)
return (Date)value;
String dateStr = value.toString();
SimpleDateFormat df = new SimpleDateFormat(DATE_FORMAT);
return df.parse(value.toString(), new ParsePosition(0));
if (dateStr.length() > DATE_FORMAT.length()) {
df = new SimpleDateFormat(DATETIME_FORMAT);
}
return df.parse(dateStr, new ParsePosition(0));
}
/**