Skip to content

Add DateTimeFormat timeZone option accepting UTC offset#29563

Open
isemanjski wants to merge 1 commit intomdn:mainfrom
isemanjski:datetimeformat-timezone-utc-offset
Open

Add DateTimeFormat timeZone option accepting UTC offset#29563
isemanjski wants to merge 1 commit intomdn:mainfrom
isemanjski:datetimeformat-timezone-utc-offset

Conversation

@isemanjski
Copy link
Copy Markdown

Summary

Add missing compatibility information for using a UTC offset string (for example, "+01:00") as the timeZone option of Intl.DateTimeFormat.

Example:

new Intl.DateTimeFormat("en", {
  timeZone: "+01:00"
});

This behavior was standardized in ECMA-402 11th Edition (June 2024).

Supporting details

This feature is not consistently documented in browser or runtime release notes, so version history was determined using a combination of public sources and manual verification.

Confirmed implementation references:

Verification performed

Browser versions (desktop browsers) were manually tested using BrowserStack. JavaScript runtimes were verified locally.

Browser verification

Browser Support added
Chrome 120
Edge 120
Firefox 121
Opera 106
Safari 17.4

Chrome 119 (suppor missing)
chrome_119_utc_offset_not_working

Chrome 120 (support added)
chrome_120_utc_offset_working

Edge 119 (support missing)
edge_119_utc_offset_not_working

Edge 120 (support added)
edge_120_utc_offset_working

Firefox 120 (support missing)
firefox_120_utc_offset_not_working

Firefox 121 (support added)
firefox_121_utc_offset_working

Opera 105 (support missing)
opera_105_utc_offset_not_working

Opera 106 (support added)
opera_106_utc_offset_working

Safari 17.3 (support missing)
safari_17_3_utc_offset_not_working

Safari 18.4 (support added)
Note: There is no 17.4 version available in BrowserStack so I used next one available, but release notes from Safari 17.4 are enough.
safari_18_4_utc_offset_working

Runtime verification

Runtime Support added
Bun 1.0.19
Deno 1.38
Node.js 22.0.0

Bun 1.0.18 (support missing) / Bun 1.0.19 (support added)
bun_1_0_19_utc_offset_working

Deno 1.37 (support missing) / Bun 1.38 (support added)
deno_1_38_utc_offset_working

Node.js 21.7.3 (support missing) / Node.js 22.0.0 (support added)
node_22_0_0_utc_offset_working

@github-actions github-actions Bot added data:js Compat data for JS/ECMAScript features. https://developer.mozilla.org/docs/Web/JavaScript size:m [PR only] 25-100 LoC changed labels Apr 28, 2026
@github-actions
Copy link
Copy Markdown
Contributor

Tip: Review these changes grouped by change (recommended for most PRs), or grouped by feature (for large PRs).

@caugner caugner changed the title DateTimeFormat - Update options_timeZone_parameter with UTC offset support Add DateTimeFormat timeZone option accepting UTC offset Apr 30, 2026
}
}
},
"utc_offset": {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: Prefix with accepts_.

Suggested change
"utc_offset": {
"accepts_utc_offset": {

},
"utc_offset": {
"__compat": {
"description": "UTC offset in `options.timeZone` option",
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: Avoid duplication.

Suggested change
"description": "UTC offset in `options.timeZone` option",
"description": "UTC offset in `timeZone` option",

@caugner
Copy link
Copy Markdown
Contributor

caugner commented Apr 30, 2026

This PR is excellent with the screenshots providing evidence for when this shipped.

@semanjski Please have a look at the failing lint check when you have a moment. 🙏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

data:js Compat data for JS/ECMAScript features. https://developer.mozilla.org/docs/Web/JavaScript size:m [PR only] 25-100 LoC changed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants