Set millis to 0 when parsing DATE4 fields. Fix UT for date4 parsing
git-svn-id: https://j8583.svn.sourceforge.net/svnroot/j8583/j8583@88 db60a039-f72e-0410-b1d2-baa000846441
This commit is contained in:
@@ -51,6 +51,7 @@ public class Date4ParseInfo extends FieldParseInfo {
|
||||
//Set the month in the date
|
||||
cal.set(Calendar.MONTH, ((buf[pos] - 48) * 10) + buf[pos + 1] - 49);
|
||||
cal.set(Calendar.DATE, ((buf[pos + 2] - 48) * 10) + buf[pos + 3] - 48);
|
||||
cal.set(Calendar.MILLISECOND,0);
|
||||
Date10ParseInfo.adjustWithFutureTolerance(cal);
|
||||
return new IsoValue<Date>(type, cal.getTime(), null);
|
||||
}
|
||||
@@ -69,6 +70,7 @@ public class Date4ParseInfo extends FieldParseInfo {
|
||||
//Set the month in the date
|
||||
cal.set(Calendar.MONTH, tens[0] - 1);
|
||||
cal.set(Calendar.DATE, tens[1]);
|
||||
cal.set(Calendar.MILLISECOND,0);
|
||||
Date10ParseInfo.adjustWithFutureTolerance(cal);
|
||||
return new IsoValue<Date>(type, cal.getTime(), null);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user