Menu

Commit [r13035]  Maximize  Restore  History

Fix negative DATETIME subtraction losing its magnitude.

Subtracting datetimes computed each field from the signed total, so a
negative difference gave every component its own minus sign:

seconds = -95703 -> "-1 -02:-35:-3"

which does not parse back, so the interval came out as zero with the sign
still attached - "-0 00:00" where "-1 02:35" was wanted. The positive
direction was always correct, which is why this went unnoticed.

Now the magnitude is split and a single leading sign applied. Test 1635
passes.

mikeaubury 2026-09-01

changed /aubit4glsrc/trunk/lib/libaubit4gl/ops.c
/aubit4glsrc/trunk/lib/libaubit4gl/ops.c Diff Switch to side-by-side view
Loading...