How can Dreamweaver handle regional time zone conversion using JavaScript's Intl.DateTimeFormat?
0 reputation · 21 Jul 2023, 08:10 UTC
In Dreamweaver, developers often need to present dates adjusted to a visitor’s local time zone while keeping the underlying timestamp stored in UTC.
The challenge is to achieve this using only client‑side JavaScript that works within Dreamweaver’s design‑time code view and live preview, without relying on server‑side processing or external libraries.
It is unclear how consistently the Intl.DateTimeFormat API behaves when invoked from Dreamweaver‑generated pages, especially in older browsers that the tool targets, and what fallback strategies are appropriate when the API is unavailable.
Does Dreamweaver preserve the original time‑zone offset when Intl.DateTimeFormat formats a date? How can a developer specify a reliable fallback formatting approach for browsers lacking full Intl support? What considerations apply when testing the output in Dreamweaver’s live view versus external browsers?