feat(rtc): implement libSceRtc date and tick functions #9
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/9"
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 Pacuka on 2026-09-26T10:21:44Z.
All
libSceRtcexports wereNotImplementedstubs. The Smurfs – Dreams (Unreal Engine) calls them during startup. This is the second of the smaller library implementations after #8. It is independent of #8, and the two merge cleanly in either order.Changes
sceRtcGetTickResolutionreturns 1000000.sceRtcCheckValid,sceRtcIsLeapYear,sceRtcGetDayOfWeek) returns the matchingSCE_RTC_ERROR_INVALID_*code (0x80B50002–0x80B5000E).sceRtcGetTick/SetTick,GetTime_t/SetTime_t,GetWin32FileTime/SetWin32FileTime.sceRtcGetCurrentTick,GetCurrentClock,GetCurrentClockLocalTime.sceRtcGetCurrentNetworkTickuses the host clock.sceRtcFormatRFC3339(YYYY-MM-DDThh:mm:ss.ccplusZor±hh:mm) andsceRtcParseRFC3339.sceRtcTickAdd*) rejects results outside the valid range withSCE_RTC_ERROR_INVALID_VALUE.sceRtcGetDaysInMonth,sceRtcTickAddMonthsandsceRtcTickAddYears. The last two clamp the day to the end of the target month (2024-01-31 + 1 month = 2024-02-29).guest_rtctest with known values: epoch ticks, leap years, day of week, time_t/FILETIME, the maximum tick, RFC 3339 round trips with positive and negative offsets, parse errors, month/year clamping, range errors, and a local ↔ UTC round trip.Testing (Linux, GCC)
guest_rtcpasses, including underTZset to UTC, Europe/Budapest, America/New_York, Asia/Kolkata, Australia/Lord_Howe and Pacific/Chatham.🤖 Generated with Claude Code