| @objectstack/formula | minor |
|---|---|
| @objectstack/spec | minor |
| @objectstack/plugin-email | minor |
feat(formula,email): render datetime in a reference timezone (ADR-0053 Phase 2)
datetime template holes now render in a reference timezone's wall-clock when one is supplied, at the presentation boundary — storage stays UTC.
- Formula template engine — the
datetimeformatter takes the reference timezone fromEvalContext.timezone(threaded in #1980) and passes it toIntl.DateTimeFormat.{{ ts | datetime }}renders in that zone;{{ ts | datetime:iso }}stays UTC (machine-readable). Calendar-daydaterendering is intentionally unchanged (tz-naive — aField.datehas no zone). New exportedformatValue(name, value, arg, { locale, timeZone })makes the whitelisted formatters reusable outside the full CEL template engine. - Email pipeline —
plugin-email's renderer previously bypassed the formatter pipeline (String()only), so a datetime went out as raw ISO. Email holes now accept the shared formula formatters —{{ order.total | currency }},{{ ts | datetime }}— reusingformatValue(single source of truth), while keeping the engine's HTML-escaping and{{{ }}}raw-output semantics.SendTemplateInput.timezone(mirroring the existinglocale) flows into rendering so an email's datetime shows the recipient's wall-clock.