fix(libs): TLOU sceRtcParseDateTime ISO 8601 subset parser #516
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/516"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from boykopovar/AnyPS5. Originally posted by Pouare514 on 2026-10-04T14:34:48Z.
What
TLOU Part I needs \sceRtcParseDateTime. Implements the ISO 8601 subset \YYYY-MM-DDTHH:MM:SS[.ffffff]\ (T/t/space separator tolerated, optional fractional seconds), reusing the file's validate/toTick helpers and error codes. Split out of the former combined TLOU runtime PR (#302, now Net only).
The accepted format source is recorded in TechnicalDebt (assumed ISO 8601 subset matching the sibling RFC 3339 parser, unverified against hardware).
Tested
Checklist
Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-04T14:35:09Z.
Progress report (
33a870d→e67d50c)📉 System libraries: 78.82% (-0.02%, +1 declared functions)
🆕 1 declared as stubs
sceRtcParseDateTimeImported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-04T21:19:06Z.
Thanks for splitting these out. The parser reuses the RFC 3339 helpers cleanly and the NID matches, but two parts of it are guesses that the code currently answers silently:
2024-02-29T12:34:56Zor+01:30), whichsceRtcParseRFC3339accepts, returnsSCE_RTC_ERROR_BAD_PARSEhere, so a title would see a valid date as unparseable.localOffsetSeconds).Since the real accepted formats aren't known, I'd accept the zone suffix through the same path as
sceRtcParseRFC3339, and throw (instead of returningBAD_PARSE) for anything outside what you've verified, keeping the range errors fromvalidate. The TechnicalDebt line can then say which choice was made for zoneless strings. Could you also add a few rows tocore/libs/tests/GuestRtc.cpp, next to the existingsceRtcParseRFC3339cases? It already has the tick values you'd need.Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-04T22:40:31Z.
Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in Depends on.
main)docs/dev/TechnicalDebt.mdL26docs/dev/TechnicalDebt.mdL26-27docs/dev/TechnicalDebt.mdL26-27Imported from boykopovar/AnyPS5. Originally posted by Pouare514 on 2026-10-04T23:12:11Z.
Done: extracted a shared parseZoneSuffix helper used by both parsers, so zoned DateTime strings go through the same path as sceRtcParseRFC3339 (RFC3339 behavior unchanged). Anything outside the verified shape now throws instead of returning BAD_PARSE; validate() range errors are kept. The TechnicalDebt line documents the zoneless-means-UTC choice. Added DateTime rows to GuestRtc.cpp next to the RFC3339 cases (UTC, space separator, zone suffixes, epoch, invalid-day, nullptr, plus five throw shapes). Notes: the test needed libc on its link line for __gxx_personality_v0 and configure_windows_unwind like the other guest tests; also dropped the stray AudioIn hunk from this branch.
Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-04T23:43:44Z.
Thanks, this is what I had in mind: zoned strings go through the same
parseZoneSuffixassceRtcParseRFC3339(whose behaviour is unchanged), shapes outside the verified subset throw, the range errors fromvalidatestay, and the zoneless-means-UTC choice is in TechnicalDebt. The new rows check the ticks against the RFC 3339 values and the five throw shapes.guest_rtcpasses here on this head merged with current main, and CI is green. Ready to merge from my side.This, #518 and #553 all insert after the
sceVideoOutOpenline in TechnicalDebt.md, so the second and third to land need a one-line rebase.