On PS5 firmware 13.60 sceRtcSetTime_t(NULL, -1) returns
SCE_RTC_ERROR_INVALID_VALUE and sceRtcSetTime_t(NULL, 0)
SCE_RTC_ERROR_INVALID_POINTER: negative seconds are rejected before a
null destination under the later SDK rules. The other measured
GetDayOfWeek, SetTime_t and FormatRFC3339 results already matched.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
The compiled SDK version of a PS5 title counts from its own SDK, so an
early PS5 title would have taken the PS4 pre-3.00 rules. Apply them only
to a CUSA title, as libSceConvertKeycode tells PS4 titles apart; anything
else, including a title without metadata, gets the later rules main had.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Measured on PS4 firmware 10.71 from processes compiled with SDK versions
0x01000051, 0x02ffffff, 0x03000000 and 0x05050001. From 0x03000000 on,
FormatRFC3339 returns INVALID_VALUE when the zone shift overflows or
underflows the tick, GetDayOfWeek checks the month before the year and
rejects years past 9999, and SetTime_t rejects negative seconds and
converts all 64 bits. 0x02ffffff and earlier keep the wrap, the year-first
order and the low 32 bits.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Measured on a PS4 (firmware 10.71) for the review of the zone-shift
overflow: sceRtcFormatRFC2822 returns 0x80B50003 for UINT64_MAX with +1
and +1439 minutes and for 2^64 - 1 minute with +1, where the shifted tick
lands in year 1. The console returns 0x80B50008 when the shifted tick is
past 9999 as a signed value (2^63 with -1 minute) and otherwise 0x80B50003
when the source or the shifted tick is negative as a signed value
(2^63 with 0, 0 with -1); the tick after 9999 with -1 minute still formats.
sceRtcFormatRFC3339 does wrap on the console: UINT64_MAX with +1 minute
returns 0 and writes 0001-01-01T00:00:59.99+00:01, as the implementation
already does. Tests now cover both.
Written with AI assistance.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Measured on a PS4 (firmware 10.71) with an OpenOrbis homebrew that loads a
probe PRX calling libSceRtc; every output starts as a sentinel, so stores
and their width are visible.
- sceRtcSetTime_t takes the low 32 bits of its argument as unsigned seconds
and returns 0 for every value: -1 is 2106-02-07 06:28:15, 2^32 + 1 is
1970-01-01 00:00:01 and -2^31 is 2038-01-19 03:14:08. sceRtcGetTime_t
stays 64-bit (2106-02-07 06:28:16 is 2^32).
- sceRtcGetTime_t before 1970 and sceRtcGetWin32FileTime before 1601 store
0 and return 0x80B50008. Field validation still comes first and leaves
the output unchanged (1969-13-01 returns 0x80B50009).
- sceRtcSetTick and sceRtcSetWin32FileTime have no upper limit: the tick
after 9999-12-31 23:59:59.999999 is 10000-01-01 and the file time
2^64 - 1 is 60056-05-28 05:36:10.955161. sceRtcGetDayOfWeek accepts
years past 9999 (10000-01-01 is 6).
- sceRtcFormatRFC3339 returns 0x80B50008 when the zone-shifted tick is
outside years 1 to 9999. sceRtcFormatRFC2822 returns 0x80B50003 when it
is negative as a signed value and 0x80B50008 when it is past 9999.
The PS5-measured cases of GuestRtc.cpp that the probe repeated (RFC 3339
and RFC 2822 parsing, named and military zones, DOS time, TickAdd) give the
same results on the PS4. The three expectations changed here (SetTick past
9999, SetTime_t(-1), RFC 2822 at the limit with +1 minute) came from
commits that cite no measurement. Not yet confirmed on PS5.
Written with AI assistance.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
decode all 70 entries at 0x4b80 used by the lookup at 0x15d0. preserve lookup order and the parser's uppercase second-letter check. cover missing zones, case handling and prefix matching in guest_rtc on windows.
Require the measured separator after RFC date minutes when seconds are absent. Preserve the destination tick on the parse failure and retain the accepted trailing-space and seconds controls.
AI-assisted; based on guarded PS5 measurements with controlled input backing storage.