Skip to content

Conversation

@JaroslavHerber
Copy link
Contributor

The XS_DATE_TIME_PATTERN in Util.java was previously limited to parsing ISO 8601 date-times that use a literal 'T' or 't' as the separator between the date and time components.

However, some content providers and metadata sources use a space character as the separator (e.g., "2025-10-28 12:09:41.913000+00:00"). This caused Util.parseXsDateTime to fail when parsing these valid, albeit non-standard, date-time strings, leading to potential parsing errors for certain media streams.

This commit updates the regular expression by adding a space to the character class [Tt], making it [Tt ]. This change extends parsing support to include date-times with a space separator while maintaining full compatibility with the standard 'T'/'t' separators.

Example stream: https://sdn-global-live-streaming-packager-cache.3qsdn.com/64733/64733_264_live.m3u8

Re-send into main from this:
#2868 (comment)

The `XS_DATE_TIME_PATTERN` in `Util.java` was previously limited to parsing ISO 8601 date-times that use a literal 'T' or 't' as the separator between the date and time components.

However, some content providers and metadata sources use a space character as the separator (e.g., "2025-10-28 12:09:41.913000+00:00"). This caused `Util.parseXsDateTime` to fail when parsing these valid, albeit non-standard, date-time strings, leading to potential parsing errors for certain media streams.

This commit updates the regular expression by adding a space to the character class `[Tt]`, making it `[Tt ]`. This change extends parsing support to include date-times with a space separator while maintaining full compatibility with the standard 'T'/'t' separators.
@icbaker icbaker self-assigned this Nov 4, 2025
@icbaker icbaker self-requested a review November 4, 2025 12:22
@icbaker
Copy link
Collaborator

icbaker commented Nov 4, 2025

I'm going to send this for internal review now. You may see some more commits being added as I make changes in response to review feedback. Please refrain from pushing any more substantive changes as it will complicate the internal review - thanks!

@copybara-service copybara-service bot merged commit 21ed001 into androidx:main Nov 5, 2025
1 check passed
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.

2 participants