ADAPT / ISOv4Plugin

Eclipse Public License 1.0
18 stars 33 forks source link

Fix DateTime comparison when determining which ISOProductAllocation governs the SpatialRecord timestamp #202

Closed ericpohl closed 1 year ago

ericpohl commented 1 year ago

We had some data in which a different seed product was used driving up to the field than was actually applied on the field. However, once the data was imported, the first (incorrect) seed product was applied to the entire field. The cause was tracked down to the DateTime comparison when determining the ISOProductAllocation, which is done by comparing time windows. The comparison failed because we were comparing spatialRecord timestamps (whose Kind property was Unspecified) against ISOProductAllocation Start and Stop values (whose Kind property was Local).

The fix converts DateTimes to UTC before doing the comparison. For the Unspecified DateTimes, we apply the TaskDataMapper.GPSToLocalDelta value.