FA-69131 / Tide and marine navigation tables / Open access
Tide table zone time to UTC: Half-hour zone descriptions are truncated · case 01
Tables for half-hour zones are thirty minutes off.
ROOT CAUSE
The offset is converted with int(off) hours, dropping the half hour.
VERIFIED REPAIR
Convert the fractional offset to minutes.
Unsuccessful approach: Rounding to whole hours uses bankers rounding and still drops half hours.
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=int(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-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 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-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", -5.5, false]', ['2026-06-15 12:00', -5.5, False], '2026-06-15 06: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-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", 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 ["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-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 ["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-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-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-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-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-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-01-01 01:05", -9.5, false]', ['2026-01-01 01:05', -9.5, False], '2025-12-31 15:35')]]
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-01-01 01:05", -9.5, false] | 2025-12-31 16:05 | 2025-12-31 15:35 | 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-07-01 00:20", -2, true] | 2026-06-30 21:20 | 2026-06-30 21:20 | 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-06-15 12:00", -5.5, false] | 2026-06-15 07:00 | 2026-06-15 06:30 | Failed |
SHA-256 / ba037cb1da42ce14d6ad3b76ce4a5e75f1afaf598eed3e2f6b0d1842374c1c52
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-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 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-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", -5.5, false]', ['2026-06-15 12:00', -5.5, False], '2026-06-15 06: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-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", 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 ["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-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 ["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-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-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-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-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-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-01-01 01:05", -9.5, false]', ['2026-01-01 01:05', -9.5, False], '2025-12-31 15:35')]]
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-01-01 01:05", -9.5, false] | 2025-12-31 15:05 | 2025-12-31 15:35 | 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-07-01 00:20", -2, true] | 2026-06-30 21:20 | 2026-06-30 21:20 | 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-06-15 12:00", -5.5, false] | 2026-06-15 06:00 | 2026-06-15 06:30 | Failed |
SHA-256 / 5dbadc39c208d50725ab8176dee7d5d87213624d616c543d9e6ebd9ad8894fc6
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-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 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-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", -5.5, false]', ['2026-06-15 12:00', -5.5, False], '2026-06-15 06: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-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", 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 ["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-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 ["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-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-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-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-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-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-01-01 01:05", -9.5, false]', ['2026-01-01 01:05', -9.5, False], '2025-12-31 15:35')]]
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-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-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-07-01 00:20", -2, true] | 2026-06-30 21:20 | 2026-06-30 21:20 | 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-06-15 12:00", -5.5, false] | 2026-06-15 06:30 | 2026-06-15 06:30 | Passed |
SHA-256 / 707fb1b4ee6734f3df871d72803fc2f30207c28e6b57a1692cb0b257409a5ad8
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.661216+00:00.
Case digest / 7eb36fc7ecbd7561cd32c7792e6075cd15de2581f2822fd03bac8ad8520f229d