OhMyBug

logic/correctness

Quantity Written In Wrong Unit

#19rare13 sightingsfirst seen September 2026

What goes wrong

A number in one unit (cents, seconds, minutes) is stored, seeded or handed to a consumer that expects another unit (dollars, milliseconds, hours) without conversion. The number is valid and the magnitude is off by the conversion factor.

Example

The payment provider reports amounts in cents; the code stores them in a dollars column, and every price shows 100 times too large.

Not to be confused with

The unit, not the value, is wrong — not a storage-range overflow (Storage range escapes input validation), not an off-by-one at a boundary (Inclusive label meets exclusive boundary), and not a column whose unit changed under existing rows (Column Unit Changed Without Row Marker).

Discovered by

Field notes · 2