Skip to content

Commit

Permalink
0002704: AbstractDatabasePlatform.parseTimestamp should always return
Browse files Browse the repository at this point in the history
the Timestamp type
  • Loading branch information
sunderrd committed Aug 3, 2016
1 parent f31af9e commit 9922bbc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 8 deletions.
5 changes: 0 additions & 5 deletions symmetric-db/src/main/java/org/jumpmind/db/model/Column.java
Expand Up @@ -725,10 +725,5 @@ public String[] getEnumValues() {
public boolean isEnum() {
return enumValues != null && enumValues.length > 0;
}

public boolean isLob() {
return mappedTypeCode == Types.BLOB || mappedTypeCode == Types.CLOB ||
mappedTypeCode == Types.NCLOB;
}

}
Expand Up @@ -879,7 +879,7 @@ public java.util.Date parseTimestamp(int type, String value) {
return Timestamp.valueOf(value);
} catch (IllegalArgumentException ex) {
try {
return FormatUtils.parseDate(value, FormatUtils.TIMESTAMP_PATTERNS);
return new Timestamp(FormatUtils.parseDate(value, FormatUtils.TIMESTAMP_PATTERNS).getTime());
} catch (Exception e) {
int split = value.lastIndexOf(" ");
String datetime = value.substring(0, split).trim();
Expand All @@ -888,9 +888,9 @@ public java.util.Date parseTimestamp(int type, String value) {
try {
return Timestamp.valueOf(datetime); // Try it again without the timezone component.
} catch (IllegalArgumentException ex2) {
return FormatUtils.parseDate(datetime,
return new Timestamp(FormatUtils.parseDate(datetime,
FormatUtils.TIMESTAMP_PATTERNS,
getTimeZone(timezone));
getTimeZone(timezone)).getTime());
}
}
}
Expand Down

0 comments on commit 9922bbc

Please sign in to comment.