Rudy Celekli

Upstream contribution · yutto-dev/yutto

yutto · Rounding SRT times at millisecond boundaries

Rudy Celekli’s engineering portfolio · AI-assisted summary

Problem

Splitting floating-point seconds into components and truncating fractional milliseconds could subtract one millisecond from the intended subtitle timestamp. Values near a minute rollover could also stop just short of the next minute.

Engineering response

The formatter rounds the entire timestamp to integer milliseconds first, then decomposes it with integer division. Carry into seconds and minutes follows directly from that representation.

Evidence and scope

The PR records three failing baseline examples, including 2.3, 4.35 and 59.9996 seconds, and a passing focused subtitle suite after the fix. It reports Ruff checks limited to the touched files.