Format a date in a timezone
Display a UTC timestamp in a deliberately chosen IANA timezone.
Original Pearto instructional example. Test it in your own environment and adapt it to your requirements.
const instant = new Date('2026-10-19T15:00:00Z');
const formatter = new Intl.DateTimeFormat('en-US', {
timeZone:'America/Chicago', year:'numeric', month:'short', day:'numeric', hour:'numeric'
});
console.log(formatter.format(instant));