fix(02): emit IANA-annotated timed strings from serializeTime

Temporal.ZonedDateTime.from() rejects offset-only ISO strings such as
'2026-06-18T08:00:00-04:00'; it requires an IANA bracket, e.g.
'2026-06-18T08:00:00-04:00[America/New_York]'. serializeTime() was
emitting offset-only for named zones and bare 'Z' for UTC — both
unparseable by the frontend, blanking the calendar view.

Changes:
- Named IANA zone: emit '...±HH:MM[tzid]' using t.zone.tzid
- UTC zone: strip trailing 'Z' from toString(), emit '+00:00[UTC]'
- Floating zone (no registered VTIMEZONE): fall back to '+00:00[UTC]'
- Update CalendarOccurrence docstrings to reflect the IANA-annotated contract
- Add temporal-polyfill@0.3.2 as dev dep in api for cross-contract test
This commit is contained in:
Lucas Berger
2026-06-05 14:02:36 -04:00
parent df5d36308a
commit 35f725d450
3 changed files with 30 additions and 13 deletions
+1
View File
@@ -29,6 +29,7 @@
"devDependencies": {
"@types/node": "^22.0.0",
"drizzle-kit": "0.31.10",
"temporal-polyfill": "0.3.2",
"typescript": "^5.5.0",
"vitest": "^4.1.8"
}