Skip to content

feat(time): support IANA time zones. close #14453 - #21739

Open
konzen wants to merge 1 commit into
apache:masterfrom
konzen:fix-14453
Open

feat(time): support IANA time zones. close #14453#21739
konzen wants to merge 1 commit into
apache:masterfrom
konzen:fix-14453

Conversation

@konzen

@konzen konzen commented Aug 17, 2026

Copy link
Copy Markdown

Brief Information

This pull request is in the type of:

  • bug fixing
  • new feature
  • others

What does this PR do?

Adds global and per-time-axis IANA time-zone support for ticks, labels, tooltips, and time utilities while preserving useUTC compatibility.

Fixed issues

Details

Before: What was the problem?

Time axes could only use UTC or the browser/operating-system time zone. Charts could not select an IANA time zone or use different time zones for different axes.

After: How does it behave after the fixing?

Charts can define a global timeZone, overridden by timeZone on individual time axes. Time-axis ticks, labels, and tooltip values use the effective axis time zone.

The legacy useUTC option remains supported, and timeZone takes precedence when both are specified. Input parsing behavior is unchanged.

The implementation uses native Intl.DateTimeFormat, without external dependencies or a bundled time-zone database.

dst-gap dst-overlap tooltip-xy-timezones

Document Info

Misc

Security Checking

  • This PR uses security-sensitive Web APIs.

ZRender Changes

  • This PR depends on ZRender changes.

Related test cases or examples to use the new APIs

  • test/ut/spec/scale/time.test.ts
  • test/ut/spec/util/time.test.ts
  • test/ut/spec/util/format.test.ts
  • test/ut/spec/component/tooltip/timeZone.test.ts

Validation:

  • npm test
  • npm run checktype
  • npm run lint
  • npm run test:dts:fast

Merging options

  • Please squash the commits into a single one when merging.

Other information

This PR builds on the work started in #21475, continuing it with a native Intl.DateTimeFormat implementation and completing global and per-axis time-zone support, backward compatibility, DST handling, tooltips, tests, and documentation.

@echarts-bot

echarts-bot Bot commented Aug 17, 2026

Copy link
Copy Markdown

Thanks for your contribution!
The community will review it ASAP. In the meanwhile, please checkout the coding standard and Wiki about How to make a pull request.

Please DO NOT commit the files in dist, i18n, and ssr/client/dist folders in a non-release pull request. These folders are for release use only.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant