Advertisement
Data Processing

The Epoch Mixup: A Seconds-Only Reader Rejects 800 of 1,200 Good Timestamps

A timestamp can be exactly right and still be thrown away. In this test, 1,200 values all described moments inside a single year, 2024, and every one...

A timestamp can be exactly right and still be thrown away. In this test, 1,200 values all described moments inside a single year, 2024, and every one of them was a correct encoding of its moment. The only difference between them was the unit they were counted in. A reader that understood just one of those units accepted 400 values and rejected 800, not because the rejected values were corrupt, but because it read them in the wrong unit and landed in years so far beyond any plausible range that its own validity check refused them. Nothing in the values themselves announced which unit they used. The sole clue was how many digits each value happened to have, and a reader that used that clue accepted all 1,200.

What The Epoch Mixup means

The Epoch Mixup means the failure that occurs when epoch timestamps written in different units — seconds, milliseconds and microseconds — arrive in the same data without any unit label, and a reader interprets all of them as if they shared the single unit it expects. Because the units differ by factors of a thousand and a million, the misreading does not nudge a value slightly out of place. It multiplies or divides the underlying count so violently that the resulting moment falls far outside any sane range, and downstream checks treat a correct value as an invalid one.

The concept matters because it separates two problems that are often confused. The first problem is accuracy: is a recorded moment close to the true moment? The second problem is legibility: can a reader recover the moment at all from the digits it was handed? The Epoch Mixup is purely a legibility failure. Every value in the test was accurate. Two thirds of them were still unreadable to a reader that guessed the unit wrong, and no amount of later accuracy work can repair values that were discarded at the door.

Three units, one unlabeled file

The Epoch Mixup: A Seconds-Only Reader Rejects 800 of 1,200 Good Timestamps

The test file held 1,200 timestamps, all of them moments within 2024, divided evenly among three written forms: 400 values in epoch seconds, each 10 digits long; 400 values in epoch milliseconds, each 13 digits long; and 400 values in epoch microseconds, each 16 digits long (Source: SmartDataAI import test V4, run 2026-11-23; script and result JSON filed with this batch's evidence pack).

Against that file stood two readers. The first, a seconds-only reader, interpreted every value as a count of seconds, and then applied a sanity rule: a result counted as valid only if it fell between the years 2000 and 2100. That reader accepted 400 of 1,200 values, which is 33.3% (Source: SmartDataAI import test V4, run 2026-11-23; script and result JSON filed with this batch's evidence pack). Its successes and failures split perfectly along unit lines. The seconds group passed in full, 400 of 400. The milliseconds group passed not at all, 0 of 400, and the microseconds group likewise passed 0 of 400, because reading those counts as seconds produced years far beyond 2100, and the range check marked every one of them invalid (Source: SmartDataAI import test V4, run 2026-11-23; script and result JSON filed with this batch's evidence pack).

The second reader used the only signal the file actually offered: length. It treated a 10-digit value as seconds, a 13-digit value as milliseconds and a 16-digit value as microseconds, converting each accordingly. That digit-count heuristic accepted 1,200 of 1,200 values, which is 100% (Source: SmartDataAI import test V4, run 2026-11-23; script and result JSON filed with this batch's evidence pack). Same file, same moments, same validity window — the entire difference in outcome came from whether the reader inferred the unit or assumed it.

The arithmetic behind the split is stark. Seconds and milliseconds differ by a factor of 1,000, and seconds and microseconds differ by a factor of 1,000,000 (derived from the unit definitions used in the test). A factor of a thousand is not a rounding issue. Applied to a count of seconds since the epoch, it does not move a moment from one day to a neighbouring day; it throws the moment so far forward that any reasonable range check, of the kind pipelines rightly use to catch garbage, will classify it as garbage. The validity window that protects a pipeline from nonsense is the very mechanism that converts a unit mixup into total rejection. The check is working as designed. The assumption feeding it is not.

How this was measured

The timestamps in this test were made up by a script rather than collected from any live system: the script invented the moments, rendered each one in seconds, milliseconds or microseconds, and mixed the three forms into a single file. The script used a fixed seed of 42, so the same file is produced on every run. Both readers were the script's own deterministic parsing logic, applying fixed rules — a seconds interpretation with a 2000 to 2100 validity window for the first reader, and a digit-count conversion for the second — with no learning, no randomness and no outside data involved. Nothing here is a measurement of a commercial product; no vendor importer, library or platform was tested. The counts are constructed quantities and are stated as such: 1,200 constructed moments, three constructed written forms, two constructed readers, and acceptance counted exactly as the rules above define it (Source: SmartDataAI import test V4, run 2026-11-23; script and result JSON filed with this batch's evidence pack).

Questions, answered

Were the rejected timestamps wrong? No. All 1,200 values correctly encoded moments in 2024. The 800 rejections were produced by reading millisecond and microsecond counts as if they were seconds, which pushed the results beyond the 2100 limit of the validity check. The values were right; the assumed unit was wrong.

Why did the seconds-only reader reject the other groups completely, instead of accepting some of them? Because the error is multiplicative and uniform. Every millisecond value, read as seconds, overshoots by the same factor of 1,000 (derived), and every microsecond value by a factor of 1,000,000 (derived). There is no partial credit in that arithmetic: a whole group lands outside the valid range, or none of it does, and here both groups landed outside it in full.

What clue lets a reader tell the units apart? Digit count, and in this file it was the only clue available. Seconds values had 10 digits, milliseconds values had 13 and microseconds values had 16, with no unit label anywhere in the data. The heuristic reader that used length as its signal accepted 100% of the file, against 33.3% for the reader that assumed seconds throughout.

Is a digit-count heuristic a complete solution? It is a rescue, not a cure. It worked perfectly on this constructed file because the three lengths did not overlap. The complete solution is for the unit to travel with the data as an explicit statement. Until it does, recording the unit each reader inferred is the step that stops one team's rescue from becoming another team's assumption.

What should an operator check first when a timestamp import rejects a large block of values? Whether the rejections cluster. In this test the failures were exactly two whole groups of 400, aligned perfectly with the two units the reader did not expect. A block rejection with clean boundaries like that points at a unit assumption in the reader, not at corruption in the source, and it can be confirmed by checking the digit lengths of the rejected values before asking anyone to repair them.

Summary

The Epoch Mixup is what happens when seconds, milliseconds and microseconds share a file with no unit label and a reader assumes one unit for all of them. In this test the seconds-only reader accepted 400 of 1,200 correct timestamps — 33.3%, and only the seconds group — while a reader that inferred the unit from digit count accepted all 1,200. The error was never that the times were inaccurate. It was that correct values, multiplied by 1,000 or 1,000,000 through a wrong assumption (derived), failed a range check and were discarded as invalid, in whole groups at a time.

Sources

Know someone who needs this? Share it.

Advertisement