diff --git a/docs/cookbook/meetingPlanner.js b/docs/cookbook/meetingPlanner.js index 401978dfbf..c53a1eb802 100644 --- a/docs/cookbook/meetingPlanner.js +++ b/docs/cookbook/meetingPlanner.js @@ -8,7 +8,7 @@ const timeZones = [ ]; // Start the table at midnight local time -const startTime = now.with({ ...Temporal.Time.from('00:00').getFields() }); // midnight +const startTime = now.with(Temporal.Time.from('00:00')); // midnight // Build the table const table = document.getElementById('meeting-planner'); @@ -16,7 +16,8 @@ timeZones.forEach(({ name }) => { const row = document.createElement('tr'); const title = document.createElement('td'); - title.textContent = `${name} (UTC${now.getOffsetString})`; + const offset = now.with({ timeZone: name }).timeZoneOffsetString; + title.textContent = `${name} (UTC${offset})`; row.appendChild(title); for (let hours = 0; hours < 24; hours++) {