fix(rtc): match sceRtcParseRFC3339 to the console #1397
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1397"
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 hugodearaujo on 2026-10-08T02:11:32Z.
What
sceRtcParseRFC3339now gives the same return code and the same output tick as the console on every input I measured. I measured them on a PS5 (firmware 13.60) by loadinglibSceRtc.sprxwithdlopenfrom a homebrew payload and calling the real export (the probe source and the full results are in the comments below). The output tick was preset to0xdeadbeefcafebabebefore each call, so the measurements also show when the console leaves it untouched.Differences from
main, all measured:main2024-02-29T12:34:56.Z(empty fraction)2024-02-29T12:34:56.1234567Z...56Zjunk,...56Z,...56+01:00x,...56+01:00:00+24:00,-24:00,+00:60,+00:99,+99:59,-99:992024-02-29T12:34:60Z2024-02-29T12:34:60+01:000001-01-01T00:00:00+01:000xffffffff296c5c00Unchanged and confirmed:
Tortseparator (a space is BAD_PARSE),Z/z,±HH:MMonly (+0100,+01,+1:30are BAD_PARSE), leading whitespace is BAD_PARSE, and the per-field errors (year 0 →0x80B50008, month →...09, day →...0A, hour ≥ 24 →...0B, minute ≥ 60 →...0C, second ≥ 61 →...0D).Title: Propagation: Paradise Hotel (PPSA15878) ships
sce_module/libSceNpCppWebApi.prx, which importssceRtcParseRFC3339(99bMGglFW3I). In that module, 16callsites go through its PLT stub, so the game's PSN web API layer does parse RFC 3339 strings.This partly undoes #429. Its range check matches RFC 3339 but not the console.
Both the "60th second" case and the out-of-range dates come from the console's common last step. It writes the tick only when the date is valid, and then subtracts the offset from whatever the tick holds.
storeParsedTickdoes the same thing. The follow-up forsceRtcParseDateTimereuses it.Tested
libSceRtc.sprxthroughdlopen: 1174 inputs (hand-written edge cases, 400 random mutations of valid strings checked after the implementation was frozen, and every string in the tests). A host harness linked against this branch'slibSceRtc.prxgives the same return code and tick as the console for all 1174.BUILD_TESTING=ON): build,libs, full CTest 408/408.libs, CTest 0 failed of 404 (GPU execution tests skipped, the VM has no GPU).guest_rtcfail.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed in TechnicalDebt.mdfiles or images added to the repository (attach them to this PR)🤖 Generated with Claude Code
Imported from boykopovar/AnyPS5. Originally posted by hugodearaujo on 2026-10-08T02:11:43Z.
Probe used for the measurements. It is a ps5-payload-sdk v0.43 homebrew payload, built with
prospero-clang -O1 -rdynamic.probe.honly binds TCP 9301 and redirects stdout to the connection.cases.his the input list, and the table in the next comments is its output.dlfcn_main.c
probe.h
Imported from boykopovar/AnyPS5. Originally posted by hugodearaujo on 2026-10-08T02:11:44Z.
PS5 measurements, part 1/2 (587 of 1174 inputs).
table
Imported from boykopovar/AnyPS5. Originally posted by hugodearaujo on 2026-10-08T02:11:45Z.
PS5 measurements, part 2/2 (587 of 1174 inputs).
table