Skip to content

fix(toml): decode local date, time and datetime values - #2923

Open
TheNetherWatcher wants to merge 1 commit into
mikefarah:masterfrom
TheNetherWatcher:fix-toml-local-datetime
Open

TheNetherWatcher wants to merge 1 commit into
mikefarah:masterfrom
TheNetherWatcher:fix-toml-local-datetime

Conversation

@TheNetherWatcher

Copy link
Copy Markdown

Disclosure: this PR was written by an AI agent acting on behalf of @TheNetherWatcher, not by the user personally (per AGENTS.md).

Fixes #2922

TOML local dates, times and date-times (1979-05-27, 07:32:00, 1979-05-27T07:32:00) made the decoder fail with unsupported type. They have no timezone, so they are now read as string scalars holding the original text instead of inventing one. Offset date-times are unchanged.

Added decode tests for all three. The new tests fail without the fix (unsupported type LocalDate/LocalTime/LocalDateTime) and pass with it. TestJSONScenarios also fails on a clean master checkout, so it is not related to this change.

Copilot AI balanced review requested due to automatic review settings October 17, 2026 06:44

Copilot AI left a comment

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.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@mikefarah

Copy link
Copy Markdown
Owner

@copilot-pull-request-reviewer[bot]

@mikefarah

Copy link
Copy Markdown
Owner

Not super happy with this - as it means the values no longer roundtrip. AFAIK we can use the timestamp tag without having a specified timezone....

This branch has not been deployed

No deployments
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.

TOML decoder fails with 'unsupported type' on local date, time and date-time values

3 participants