Skip to content

Conversation

@ptomato
Copy link
Collaborator

@ptomato ptomato commented Jan 9, 2026

This makes DateTimeFormat's various formatting methods throw when given a Temporal.Plain___ object, unless the formatter's time zone is UTC.

The one-off formatter objects constructed in the Plain types' toLocaleString methods get their time zone overridden to be UTC.

Closes: #3212

This makes DateTimeFormat's various formatting methods throw when given
a Temporal.Plain___ object, unless the formatter's time zone is UTC.

The one-off formatter objects constructed in the Plain types'
toLocaleString methods get their time zone overridden to be UTC.

Closes: #3212
@codecov
Copy link

codecov bot commented Jan 9, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 97.39%. Comparing base (9e63759) to head (6099269).
⚠️ Report is 26 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3247   +/-   ##
=======================================
  Coverage   97.39%   97.39%           
=======================================
  Files          22       22           
  Lines       10397    10397           
  Branches     1828     1828           
=======================================
  Hits        10126    10126           
  Misses        247      247           
  Partials       24       24           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@justingrant
Copy link
Collaborator

I don't like this solution at all. #3246 provides a clearer developer experience, IMO.

@gibson042
Copy link
Member

I don't like this solution at all. #3246 provides a clearer developer experience, IMO.

I agree.

@ptomato
Copy link
Collaborator Author

ptomato commented Jan 15, 2026

Decided against this solution in the Temporal meeting of 2026-01-15.

@ptomato ptomato closed this Jan 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

confusing behavior about time zone in toLocaleString and Intl.DateTimeFormat

4 participants