Details
-
Bug
-
Status: Open
-
Minor
-
Resolution: Unresolved
-
1.10.0
-
None
-
None
-
None
Description
Set an IntervalDay column using a Period object of the form P3DT4H5M23S.
Retrieve the data using getObject(), which returns a Period. However, the object is not normalized; it comes back as P3DT14723S.
The problem is how we create the object:
@Override public Period getObject(int index) { final int offsetIndex = index * VALUE_WIDTH; final int millis = data.getInt(offsetIndex + 4); final int days = data.getInt(offsetIndex); final Period p = new Period(); return p.plusDays(days).plusMillis(millis); }
The workaround is to call normalizedStandard() to the returned value. Instead, this method should be called before returning the result.