Compute timestamp durations with exact integer components

When a database validates a numeric duration against the exact difference between two timestamps, compute the application value from whole days, whole seconds, and microseconds. Converting a time delta through floating point can round a long or fractional interval before decimal serialization, causing a correct observation to fail an equality check. Test an interval with both a long whole portion and microseconds. This rule applies to exact persistence contracts; if the database intentionally rounds or tolerates error, match that documented contract instead.

Applies when: Application code writes elapsed time that the database recomputes exactly. Keywords: timestamp duration microseconds decimal floating point equality database parity