Skip to content

Support seconds in ZoneNameTimestamp human-readable serde deserialization - #8553

Merged
Manishearth merged 2 commits into
unicode-org:mainfrom
Manishearth:fix-zone-name-timestamp-serde
Oct 7, 2026
Merged

Manishearth merged 2 commits into
unicode-org:mainfrom
Manishearth:fix-zone-name-timestamp-serde

Conversation

@Manishearth

Copy link
Copy Markdown
Member

ZoneNameTimestamp::serialize emits 19-byte "YYYY-MM-DD HH:MM:SS" strings when the timestamp has non-zero seconds (such as ZoneNameTimestamp::far_in_past()), but ZoneNameTimestamp::deserialize rejected any string with length != 16.

Changelog

icU_time: Support seconds in ZoneNameTimestamp human-readable serde deserialization

…de deserialization

ZoneNameTimestamp::serialize emits 19-byte "YYYY-MM-DD HH:MM:SS" strings
when the timestamp has non-zero seconds (such as ZoneNameTimestamp::far_in_past()),
but ZoneNameTimestamp::deserialize rejected any string with length != 16.

@robertbastian robertbastian left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This used to be correct before #6942 introduced ZoneNameTimestamps with seconds.

Comment thread components/time/src/zone/zone_name_timestamp.rs Outdated
Co-authored-by: Robert Bastian <4706271+robertbastian@users.noreply.github.com>
@Manishearth
Manishearth merged commit 8712694 into unicode-org:main Oct 7, 2026
34 checks passed
@Manishearth
Manishearth deleted the fix-zone-name-timestamp-serde branch October 7, 2026 20:04
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.

2 participants