FAILURE MAP
← Case archive

FA-6566 / Calendar arithmetic / Open access

Seconds since midnight · case 01

Decimal clock encoding is confused with elapsed seconds.

Verified by executionVariant 1 · 4 checks per implementationDownload source bundle ↓JSON ↗

ROOT CAUSE

Decimal clock encoding is confused with elapsed seconds.

VERIFIED REPAIR

Apply the specified mathematical contract directly, preserving all terms and boundary cases: return hour*3600+minute*60+second

Unsuccessful approach: Minutes are not scaled by sixty.

Case contract

Valid ISO Gregorian dates in years 1 through 9999; generated dates must remain in that range. Month is 1 through 12 and zero-based weekday is Monday 0 through Sunday 6 unless the output convention says otherwise. hour=0..23, minute=0..59 and second=0..59; leap seconds are outside this model. Exact operational definition: hour*3600+minute*60+second

Why this case matters

Small exact fixtures expose this error without platform timing, external services, or probabilistic observations. Calendar conventions results depend on the stated convention.

1 / The failure

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json
import math
import calendar
import statistics
import itertools
from fractions import Fraction
from datetime import date, datetime, timedelta, timezone
from decimal import Decimal, ROUND_HALF_UP, ROUND_DOWN, ROUND_CEILING, ROUND_FLOOR

N = 1
observations = []
def solve(hour, minute, second):
    return hour*10000+minute*100+second
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1: (1, 2, 3)', solve(*(1, 2, 3)), 3723)
check('fixture 2: (0, 1, 0)', solve(*(0, 1, 0)), 60)
check('fixture 3: (23, 59, 59)', solve(*(23, 59, 59)), 86399)
check('fixture 4: (0, 0, 0)', solve(*(0, 0, 0)), 0)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
Boundary fixtureActualExpectedOutcome
fixture 1: (1, 2, 3)102033723Failed
fixture 2: (0, 1, 0)10060Failed
fixture 3: (23, 59, 59)23595986399Failed
fixture 4: (0, 0, 0)00Passed

SHA-256 / f03393dd15b61e66c4ef6cdef03fd15ee14b8c9455e3acf1b8bff233c575e33b

2 / The unsuccessful fix

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json
import math
import calendar
import statistics
import itertools
from fractions import Fraction
from datetime import date, datetime, timedelta, timezone
from decimal import Decimal, ROUND_HALF_UP, ROUND_DOWN, ROUND_CEILING, ROUND_FLOOR

N = 1
observations = []
def solve(hour, minute, second):
    return hour*3600+minute+second
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1: (1, 2, 3)', solve(*(1, 2, 3)), 3723)
check('fixture 2: (0, 1, 0)', solve(*(0, 1, 0)), 60)
check('fixture 3: (23, 59, 59)', solve(*(23, 59, 59)), 86399)
check('fixture 4: (0, 0, 0)', solve(*(0, 0, 0)), 0)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
Boundary fixtureActualExpectedOutcome
fixture 1: (1, 2, 3)36053723Failed
fixture 2: (0, 1, 0)160Failed
fixture 3: (23, 59, 59)8291886399Failed
fixture 4: (0, 0, 0)00Passed

SHA-256 / 31466cac7a614733e8faf33c2b42c602dec977789a9c5bfd1dd9753c1bdabba2

3 / The verified repair

Exit 0
"""Failure Map reference implementation. Python standard library only."""
import json
import math
import calendar
import statistics
import itertools
from fractions import Fraction
from datetime import date, datetime, timedelta, timezone
from decimal import Decimal, ROUND_HALF_UP, ROUND_DOWN, ROUND_CEILING, ROUND_FLOOR

N = 1
observations = []
def solve(hour, minute, second):
    return hour*3600+minute*60+second
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1: (1, 2, 3)', solve(*(1, 2, 3)), 3723)
check('fixture 2: (0, 1, 0)', solve(*(0, 1, 0)), 60)
check('fixture 3: (23, 59, 59)', solve(*(23, 59, 59)), 86399)
check('fixture 4: (0, 0, 0)', solve(*(0, 0, 0)), 0)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
Boundary fixtureActualExpectedOutcome
fixture 1: (1, 2, 3)37233723Passed
fixture 2: (0, 1, 0)6060Passed
fixture 3: (23, 59, 59)8639986399Passed
fixture 4: (0, 0, 0)00Passed

SHA-256 / 7fa822a2a5384530488e1abaa0077fcb41aaf4262952bcda0308624852e72d51

Verification & scope

This reproducer isolates one failure mechanism. Results cover the supplied fixtures. Variants within a family share a test contract and should remain grouped when constructing evaluation splits. Related mechanisms with a shared evaluation_group must also remain together; these controlled models are not independent production incidents.

Observations recorded using Python 3.12.14 at 2026-09-29T14:38:03.124125+00:00.

Case digest / 229685b0837cf81093fd6fbd9d5eec64c8d7d402b3033079d216c2e01366f60e