Skip to main content

example-timezone-boundary

Reference — generated from the toolkit

Source of truth: toolkit/scaffold/memory/example-timezone-boundary.md. Edit it there; this page is regenerated on build.

Symptom: renewals for policyholders acting after ~23:00 UK time were dated one day early, tripping the "effective date precedes cover start" validation.

Root cause: renewal date computed from a UTC timestamp, then compared against a cover-start date stored in UK local time. In BST the UTC instant rolls to the next day after 23:00.

Fix: compute renewal dates in Europe/London, not UTC; compare dates in the same zone. Never mix a UTC instant with a local date in date arithmetic.

Verification: boundary test at 23:30 BST asserts the renewal date equals the local calendar date; regression added to the date-arithmetic suite.