FA-69136 / Tide and marine navigation tables / Open access
Tide table zone time to UTC: UTC output uses a twelve-hour clock · case 01
Afternoon events are indistinguishable from morning ones.
ROOT CAUSE
The output format uses %I instead of %H.
VERIFIED REPAIR
Format hours with %H.
Unsuccessful approach: Using %m for minutes prints the month in the minute field.
Case contract
Input [local "YYYY-MM-DD HH:MM", zd, dst]: zone description zd in hours (positive west, may be fractional); UTC = zone time + zd, and when the table is on daylight time the clock is one hour ahead so UTC = local + zd - 1. Return UTC as "YYYY-MM-DD HH:MM" (24-hour).
Why this case matters
Tide tables and passage plans turn published predictions into go/no-go decisions about depth, clearance and timing.
1 / The failure
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
import math
import datetime
N = 1
observations = []
def solve(x):
s,zd,dst=x
dt=datetime.datetime.strptime(s,'%Y-%m-%d %H:%M')
off=zd-(1 if dst else 0)
u=dt+datetime.timedelta(minutes=round(off*60))
return u.strftime('%Y-%m-%d %I:%M')
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[('tide table zone time to utc ["2026-07-01 00:20", -2, true]', ['2026-07-01 00:20', -2, True], '2026-06-30 21:20'), ('tide table zone time to utc ["2026-03-14 06:12", 5, false]', ['2026-03-14 06:12', 5, False], '2026-03-14 11:12'), ('tide table zone time to utc ["2026-03-14 21:40", 5, false]', ['2026-03-14 21:40', 5, False], '2026-03-15 02:40'), ('tide table zone time to utc ["2026-07-01 23:30", 4, true]', ['2026-07-01 23:30', 4, True], '2026-07-02 02:30'), ('tide table zone time to utc ["2026-12-31 22:15", 3, false]', ['2026-12-31 22:15', 3, False], '2027-01-01 01:15'), ('tide table zone time to utc ["2026-01-01 01:05", -9.5, false]', ['2026-01-01 01:05', -9.5, False], '2025-12-31 15:35'), ('tide table zone time to utc ["2026-06-15 12:00", -5.5, false]', ['2026-06-15 12:00', -5.5, False], '2026-06-15 06:30')], [('tide table zone time to utc ["2026-01-01 01:05", -9.5, false]', ['2026-01-01 01:05', -9.5, False], '2025-12-31 15:35'), ('tide table zone time to utc ["2026-03-14 21:40", 5, false]', ['2026-03-14 21:40', 5, False], '2026-03-15 02:40'), ('tide table zone time to utc ["2026-07-01 00:20", -2, true]', ['2026-07-01 00:20', -2, True], '2026-06-30 21:20'), ('tide table zone time to utc ["2026-12-31 22:15", 3, false]', ['2026-12-31 22:15', 3, False], '2027-01-01 01:15'), ('tide table zone time to utc ["2026-06-15 12:00", -5.5, false]', ['2026-06-15 12:00', -5.5, False], '2026-06-15 06:30'), ('tide table zone time to utc ["2026-06-15 12:00", 0, true]', ['2026-06-15 12:00', 0, True], '2026-06-15 11:00'), ('tide table zone time to utc ["2028-02-28 23:50", 1, false]', ['2028-02-28 23:50', 1, False], '2028-02-29 00:50')], [('tide table zone time to utc ["2028-02-28 23:50", 1, false]', ['2028-02-28 23:50', 1, False], '2028-02-29 00:50'), ('tide table zone time to utc ["2026-07-01 23:30", 4, true]', ['2026-07-01 23:30', 4, True], '2026-07-02 02:30'), ('tide table zone time to utc ["2026-06-15 12:00", -5.5, false]', ['2026-06-15 12:00', -5.5, False], '2026-06-15 06:30'), ('tide table zone time to utc ["2026-06-15 12:00", 0, true]', ['2026-06-15 12:00', 0, True], '2026-06-15 11:00'), ('tide table zone time to utc ["2026-09-10 13:45", -10, false]', ['2026-09-10 13:45', -10, False], '2026-09-10 03:45'), ('tide table zone time to utc ["2026-09-10 10:45", 3.5, true]', ['2026-09-10 10:45', 3.5, True], '2026-09-10 13:15'), ('tide table zone time to utc ["2026-05-05 05:05", 0, false]', ['2026-05-05 05:05', 0, False], '2026-05-05 05:05')], [('tide table zone time to utc ["2026-09-10 10:45", 3.5, true]', ['2026-09-10 10:45', 3.5, True], '2026-09-10 13:15'), ('tide table zone time to utc ["2026-07-01 00:20", -2, true]', ['2026-07-01 00:20', -2, True], '2026-06-30 21:20'), ('tide table zone time to utc ["2026-09-10 13:45", -10, false]', ['2026-09-10 13:45', -10, False], '2026-09-10 03:45'), ('tide table zone time to utc ["2026-05-05 05:05", 0, false]', ['2026-05-05 05:05', 0, False], '2026-05-05 05:05'), ('tide table zone time to utc ["2026-03-14 06:12", 5, false]', ['2026-03-14 06:12', 5, False], '2026-03-14 11:12'), ('tide table zone time to utc ["2026-03-14 21:40", 5, false]', ['2026-03-14 21:40', 5, False], '2026-03-15 02:40'), ('tide table zone time to utc ["2026-07-01 23:30", 4, true]', ['2026-07-01 23:30', 4, True], '2026-07-02 02:30')], [('tide table zone time to utc ["2026-07-01 00:20", -2, true]', ['2026-07-01 00:20', -2, True], '2026-06-30 21:20'), ('tide table zone time to utc ["2026-12-31 22:15", 3, false]', ['2026-12-31 22:15', 3, False], '2027-01-01 01:15'), ('tide table zone time to utc ["2026-03-14 06:12", 5, false]', ['2026-03-14 06:12', 5, False], '2026-03-14 11:12'), ('tide table zone time to utc ["2026-03-14 21:40", 5, false]', ['2026-03-14 21:40', 5, False], '2026-03-15 02:40'), ('tide table zone time to utc ["2026-07-01 23:30", 4, true]', ['2026-07-01 23:30', 4, True], '2026-07-02 02:30'), ('tide table zone time to utc ["2026-01-01 01:05", -9.5, false]', ['2026-01-01 01:05', -9.5, False], '2025-12-31 15:35'), ('tide table zone time to utc ["2026-06-15 12:00", -5.5, false]', ['2026-06-15 12:00', -5.5, False], '2026-06-15 06:30')]]
for label, args, expected in fixtures[N-1]:
check(label, solve(args), expected)
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 fixture | Actual | Expected | Outcome |
|---|---|---|---|
| tide table zone time to utc ["2026-07-01 00:20", -2, true] | 2026-06-30 09:20 | 2026-06-30 21:20 | Failed |
| tide table zone time to utc ["2026-03-14 06:12", 5, false] | 2026-03-14 11:12 | 2026-03-14 11:12 | Passed |
| tide table zone time to utc ["2026-03-14 21:40", 5, false] | 2026-03-15 02:40 | 2026-03-15 02:40 | Passed |
| tide table zone time to utc ["2026-07-01 23:30", 4, true] | 2026-07-02 02:30 | 2026-07-02 02:30 | Passed |
| tide table zone time to utc ["2026-12-31 22:15", 3, false] | 2027-01-01 01:15 | 2027-01-01 01:15 | Passed |
| tide table zone time to utc ["2026-01-01 01:05", -9.5, false] | 2025-12-31 03:35 | 2025-12-31 15:35 | Failed |
| tide table zone time to utc ["2026-06-15 12:00", -5.5, false] | 2026-06-15 06:30 | 2026-06-15 06:30 | Passed |
SHA-256 / 9884d6c102a9f2539554de3df93b043bb4cf3cd3ce80974a01110aea1c65c733
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
import math
import datetime
N = 1
observations = []
def solve(x):
s,zd,dst=x
dt=datetime.datetime.strptime(s,'%Y-%m-%d %H:%M')
off=zd-(1 if dst else 0)
u=dt+datetime.timedelta(minutes=round(off*60))
return u.strftime('%Y-%m-%d %H:%m')
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[('tide table zone time to utc ["2026-07-01 00:20", -2, true]', ['2026-07-01 00:20', -2, True], '2026-06-30 21:20'), ('tide table zone time to utc ["2026-03-14 06:12", 5, false]', ['2026-03-14 06:12', 5, False], '2026-03-14 11:12'), ('tide table zone time to utc ["2026-03-14 21:40", 5, false]', ['2026-03-14 21:40', 5, False], '2026-03-15 02:40'), ('tide table zone time to utc ["2026-07-01 23:30", 4, true]', ['2026-07-01 23:30', 4, True], '2026-07-02 02:30'), ('tide table zone time to utc ["2026-12-31 22:15", 3, false]', ['2026-12-31 22:15', 3, False], '2027-01-01 01:15'), ('tide table zone time to utc ["2026-01-01 01:05", -9.5, false]', ['2026-01-01 01:05', -9.5, False], '2025-12-31 15:35'), ('tide table zone time to utc ["2026-06-15 12:00", -5.5, false]', ['2026-06-15 12:00', -5.5, False], '2026-06-15 06:30')], [('tide table zone time to utc ["2026-01-01 01:05", -9.5, false]', ['2026-01-01 01:05', -9.5, False], '2025-12-31 15:35'), ('tide table zone time to utc ["2026-03-14 21:40", 5, false]', ['2026-03-14 21:40', 5, False], '2026-03-15 02:40'), ('tide table zone time to utc ["2026-07-01 00:20", -2, true]', ['2026-07-01 00:20', -2, True], '2026-06-30 21:20'), ('tide table zone time to utc ["2026-12-31 22:15", 3, false]', ['2026-12-31 22:15', 3, False], '2027-01-01 01:15'), ('tide table zone time to utc ["2026-06-15 12:00", -5.5, false]', ['2026-06-15 12:00', -5.5, False], '2026-06-15 06:30'), ('tide table zone time to utc ["2026-06-15 12:00", 0, true]', ['2026-06-15 12:00', 0, True], '2026-06-15 11:00'), ('tide table zone time to utc ["2028-02-28 23:50", 1, false]', ['2028-02-28 23:50', 1, False], '2028-02-29 00:50')], [('tide table zone time to utc ["2028-02-28 23:50", 1, false]', ['2028-02-28 23:50', 1, False], '2028-02-29 00:50'), ('tide table zone time to utc ["2026-07-01 23:30", 4, true]', ['2026-07-01 23:30', 4, True], '2026-07-02 02:30'), ('tide table zone time to utc ["2026-06-15 12:00", -5.5, false]', ['2026-06-15 12:00', -5.5, False], '2026-06-15 06:30'), ('tide table zone time to utc ["2026-06-15 12:00", 0, true]', ['2026-06-15 12:00', 0, True], '2026-06-15 11:00'), ('tide table zone time to utc ["2026-09-10 13:45", -10, false]', ['2026-09-10 13:45', -10, False], '2026-09-10 03:45'), ('tide table zone time to utc ["2026-09-10 10:45", 3.5, true]', ['2026-09-10 10:45', 3.5, True], '2026-09-10 13:15'), ('tide table zone time to utc ["2026-05-05 05:05", 0, false]', ['2026-05-05 05:05', 0, False], '2026-05-05 05:05')], [('tide table zone time to utc ["2026-09-10 10:45", 3.5, true]', ['2026-09-10 10:45', 3.5, True], '2026-09-10 13:15'), ('tide table zone time to utc ["2026-07-01 00:20", -2, true]', ['2026-07-01 00:20', -2, True], '2026-06-30 21:20'), ('tide table zone time to utc ["2026-09-10 13:45", -10, false]', ['2026-09-10 13:45', -10, False], '2026-09-10 03:45'), ('tide table zone time to utc ["2026-05-05 05:05", 0, false]', ['2026-05-05 05:05', 0, False], '2026-05-05 05:05'), ('tide table zone time to utc ["2026-03-14 06:12", 5, false]', ['2026-03-14 06:12', 5, False], '2026-03-14 11:12'), ('tide table zone time to utc ["2026-03-14 21:40", 5, false]', ['2026-03-14 21:40', 5, False], '2026-03-15 02:40'), ('tide table zone time to utc ["2026-07-01 23:30", 4, true]', ['2026-07-01 23:30', 4, True], '2026-07-02 02:30')], [('tide table zone time to utc ["2026-07-01 00:20", -2, true]', ['2026-07-01 00:20', -2, True], '2026-06-30 21:20'), ('tide table zone time to utc ["2026-12-31 22:15", 3, false]', ['2026-12-31 22:15', 3, False], '2027-01-01 01:15'), ('tide table zone time to utc ["2026-03-14 06:12", 5, false]', ['2026-03-14 06:12', 5, False], '2026-03-14 11:12'), ('tide table zone time to utc ["2026-03-14 21:40", 5, false]', ['2026-03-14 21:40', 5, False], '2026-03-15 02:40'), ('tide table zone time to utc ["2026-07-01 23:30", 4, true]', ['2026-07-01 23:30', 4, True], '2026-07-02 02:30'), ('tide table zone time to utc ["2026-01-01 01:05", -9.5, false]', ['2026-01-01 01:05', -9.5, False], '2025-12-31 15:35'), ('tide table zone time to utc ["2026-06-15 12:00", -5.5, false]', ['2026-06-15 12:00', -5.5, False], '2026-06-15 06:30')]]
for label, args, expected in fixtures[N-1]:
check(label, solve(args), expected)
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 fixture | Actual | Expected | Outcome |
|---|---|---|---|
| tide table zone time to utc ["2026-07-01 00:20", -2, true] | 2026-06-30 21:06 | 2026-06-30 21:20 | Failed |
| tide table zone time to utc ["2026-03-14 06:12", 5, false] | 2026-03-14 11:03 | 2026-03-14 11:12 | Failed |
| tide table zone time to utc ["2026-03-14 21:40", 5, false] | 2026-03-15 02:03 | 2026-03-15 02:40 | Failed |
| tide table zone time to utc ["2026-07-01 23:30", 4, true] | 2026-07-02 02:07 | 2026-07-02 02:30 | Failed |
| tide table zone time to utc ["2026-12-31 22:15", 3, false] | 2027-01-01 01:01 | 2027-01-01 01:15 | Failed |
| tide table zone time to utc ["2026-01-01 01:05", -9.5, false] | 2025-12-31 15:12 | 2025-12-31 15:35 | Failed |
| tide table zone time to utc ["2026-06-15 12:00", -5.5, false] | 2026-06-15 06:06 | 2026-06-15 06:30 | Failed |
SHA-256 / c9d7c5aef0d77c694d8bb5541a5cd41f9b9a4f01aaf2aaa5d5940dc9236f8966
3 / The verified repair
Exit 0"""Failure Map reference implementation. Python standard library only."""
import json
import math
import datetime
N = 1
observations = []
def solve(x):
s,zd,dst=x
dt=datetime.datetime.strptime(s,'%Y-%m-%d %H:%M')
off=zd-(1 if dst else 0)
u=dt+datetime.timedelta(minutes=round(off*60))
return u.strftime('%Y-%m-%d %H:%M')
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[('tide table zone time to utc ["2026-07-01 00:20", -2, true]', ['2026-07-01 00:20', -2, True], '2026-06-30 21:20'), ('tide table zone time to utc ["2026-03-14 06:12", 5, false]', ['2026-03-14 06:12', 5, False], '2026-03-14 11:12'), ('tide table zone time to utc ["2026-03-14 21:40", 5, false]', ['2026-03-14 21:40', 5, False], '2026-03-15 02:40'), ('tide table zone time to utc ["2026-07-01 23:30", 4, true]', ['2026-07-01 23:30', 4, True], '2026-07-02 02:30'), ('tide table zone time to utc ["2026-12-31 22:15", 3, false]', ['2026-12-31 22:15', 3, False], '2027-01-01 01:15'), ('tide table zone time to utc ["2026-01-01 01:05", -9.5, false]', ['2026-01-01 01:05', -9.5, False], '2025-12-31 15:35'), ('tide table zone time to utc ["2026-06-15 12:00", -5.5, false]', ['2026-06-15 12:00', -5.5, False], '2026-06-15 06:30')], [('tide table zone time to utc ["2026-01-01 01:05", -9.5, false]', ['2026-01-01 01:05', -9.5, False], '2025-12-31 15:35'), ('tide table zone time to utc ["2026-03-14 21:40", 5, false]', ['2026-03-14 21:40', 5, False], '2026-03-15 02:40'), ('tide table zone time to utc ["2026-07-01 00:20", -2, true]', ['2026-07-01 00:20', -2, True], '2026-06-30 21:20'), ('tide table zone time to utc ["2026-12-31 22:15", 3, false]', ['2026-12-31 22:15', 3, False], '2027-01-01 01:15'), ('tide table zone time to utc ["2026-06-15 12:00", -5.5, false]', ['2026-06-15 12:00', -5.5, False], '2026-06-15 06:30'), ('tide table zone time to utc ["2026-06-15 12:00", 0, true]', ['2026-06-15 12:00', 0, True], '2026-06-15 11:00'), ('tide table zone time to utc ["2028-02-28 23:50", 1, false]', ['2028-02-28 23:50', 1, False], '2028-02-29 00:50')], [('tide table zone time to utc ["2028-02-28 23:50", 1, false]', ['2028-02-28 23:50', 1, False], '2028-02-29 00:50'), ('tide table zone time to utc ["2026-07-01 23:30", 4, true]', ['2026-07-01 23:30', 4, True], '2026-07-02 02:30'), ('tide table zone time to utc ["2026-06-15 12:00", -5.5, false]', ['2026-06-15 12:00', -5.5, False], '2026-06-15 06:30'), ('tide table zone time to utc ["2026-06-15 12:00", 0, true]', ['2026-06-15 12:00', 0, True], '2026-06-15 11:00'), ('tide table zone time to utc ["2026-09-10 13:45", -10, false]', ['2026-09-10 13:45', -10, False], '2026-09-10 03:45'), ('tide table zone time to utc ["2026-09-10 10:45", 3.5, true]', ['2026-09-10 10:45', 3.5, True], '2026-09-10 13:15'), ('tide table zone time to utc ["2026-05-05 05:05", 0, false]', ['2026-05-05 05:05', 0, False], '2026-05-05 05:05')], [('tide table zone time to utc ["2026-09-10 10:45", 3.5, true]', ['2026-09-10 10:45', 3.5, True], '2026-09-10 13:15'), ('tide table zone time to utc ["2026-07-01 00:20", -2, true]', ['2026-07-01 00:20', -2, True], '2026-06-30 21:20'), ('tide table zone time to utc ["2026-09-10 13:45", -10, false]', ['2026-09-10 13:45', -10, False], '2026-09-10 03:45'), ('tide table zone time to utc ["2026-05-05 05:05", 0, false]', ['2026-05-05 05:05', 0, False], '2026-05-05 05:05'), ('tide table zone time to utc ["2026-03-14 06:12", 5, false]', ['2026-03-14 06:12', 5, False], '2026-03-14 11:12'), ('tide table zone time to utc ["2026-03-14 21:40", 5, false]', ['2026-03-14 21:40', 5, False], '2026-03-15 02:40'), ('tide table zone time to utc ["2026-07-01 23:30", 4, true]', ['2026-07-01 23:30', 4, True], '2026-07-02 02:30')], [('tide table zone time to utc ["2026-07-01 00:20", -2, true]', ['2026-07-01 00:20', -2, True], '2026-06-30 21:20'), ('tide table zone time to utc ["2026-12-31 22:15", 3, false]', ['2026-12-31 22:15', 3, False], '2027-01-01 01:15'), ('tide table zone time to utc ["2026-03-14 06:12", 5, false]', ['2026-03-14 06:12', 5, False], '2026-03-14 11:12'), ('tide table zone time to utc ["2026-03-14 21:40", 5, false]', ['2026-03-14 21:40', 5, False], '2026-03-15 02:40'), ('tide table zone time to utc ["2026-07-01 23:30", 4, true]', ['2026-07-01 23:30', 4, True], '2026-07-02 02:30'), ('tide table zone time to utc ["2026-01-01 01:05", -9.5, false]', ['2026-01-01 01:05', -9.5, False], '2025-12-31 15:35'), ('tide table zone time to utc ["2026-06-15 12:00", -5.5, false]', ['2026-06-15 12:00', -5.5, False], '2026-06-15 06:30')]]
for label, args, expected in fixtures[N-1]:
check(label, solve(args), expected)
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 fixture | Actual | Expected | Outcome |
|---|---|---|---|
| tide table zone time to utc ["2026-07-01 00:20", -2, true] | 2026-06-30 21:20 | 2026-06-30 21:20 | Passed |
| tide table zone time to utc ["2026-03-14 06:12", 5, false] | 2026-03-14 11:12 | 2026-03-14 11:12 | Passed |
| tide table zone time to utc ["2026-03-14 21:40", 5, false] | 2026-03-15 02:40 | 2026-03-15 02:40 | Passed |
| tide table zone time to utc ["2026-07-01 23:30", 4, true] | 2026-07-02 02:30 | 2026-07-02 02:30 | Passed |
| tide table zone time to utc ["2026-12-31 22:15", 3, false] | 2027-01-01 01:15 | 2027-01-01 01:15 | Passed |
| tide table zone time to utc ["2026-01-01 01:05", -9.5, false] | 2025-12-31 15:35 | 2025-12-31 15:35 | Passed |
| tide table zone time to utc ["2026-06-15 12:00", -5.5, false] | 2026-06-15 06:30 | 2026-06-15 06:30 | Passed |
SHA-256 / 86d8642d6decc619e6dde91dd190ee75faec62b5c5746244f9899aadd0190d95
Verification & scope
A deterministic toy model with stipulated rules and constants; not certified hydrographic software or a substitute for official tide tables. 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:48:08.703899+00:00.
Case digest / 10cefab50925c2b9bd6844d7515fd469db6723993396e8fcfce4e11d78f35994