Commit Graph

21 Commits

Author SHA1 Message Date
Zayd Zaari 396412496f fix(rtc): reject date strings ending at the minutes
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.
2026-10-12 19:44:03 +00:00
Zayd Zaari 4d15f9ef24 fix(rtc): recognize additional measured named time zones
Add thirteen offsets measured repeatedly on PS5 firmware 13.42, keeping DST names ahead of their shorter prefixes. Cover case folding, prefix matching and a second valid date.

Written with AI assistance; validated against real hardware and the guest RTC tests.
2026-10-11 17:36:41 +00:00
hazzardouslysolid fb1eb20ed4 fix(rtc): floor pre-epoch timestamps for timezone lookup 2026-10-10 09:28:30 +08:00
eljackjoestar-cmd 4dc29440d5 fix(rtc): validate ticks before timezone conversion 2026-10-09 18:20:55 +04:00
Adrià c68c7576b9
Merge pull request #1399 from hugodearaujo/fix/rtc-parse-datetime-rfc2822-hardware
fix(rtc): parse RFC 2822, RFC 850 and asctime text like the console
2026-10-08 15:05:42 +02:00
Adrià 09a17e963a
Merge pull request #1398 from hugodearaujo/fix/rtc-parse-datetime-iso-hardware
fix(rtc): parse ISO text in sceRtcParseDateTime by the RFC 3339 rules
2026-10-08 14:56:12 +02:00
Dean a57ccfb426
Merge pull request #1275 from KSWORK2001/fix/libscertc-dostime-range
fix(libSceRtc): answer out-of-range years in sceRtcGetDosTime
2026-10-08 19:35:43 +13:00
hugodearaujo a156104cba fix(rtc): parse RFC 2822, RFC 850 and asctime text like the console
Measured on a PS5 (firmware 13.60) through dlopen of libSceRtc.sprx.
The weekday is required in any case or length, month names may be
full, RFC 2822 and RFC 850 share one lenient grammar with 2-digit years
split at 50, and the asctime zone is ignored. Zones come from a name
table, a military letter, or +HHMM without a range check. Text the
console rejects returns a parse error with the tick untouched, and an
invalid calendar date returns 0 with only the offset applied to the
tick, as the console does.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-07 19:08:10 -03:00
hugodearaujo 32dd014efe fix(rtc): parse ISO text in sceRtcParseDateTime by the RFC 3339 rules
On a PS5 (firmware 13.60) every input that starts with a digit gets the
same result and tick from sceRtcParseDateTime as from
sceRtcParseRFC3339, except that leading spaces and tabs are skipped
first. A string without a zone, or with a space instead of T, is a
parse error rather than UTC.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-07 19:04:17 -03:00
hugodearaujo fcfe9b56a3 fix(rtc): match sceRtcParseRFC3339 to the console
Measured on a PS5 (firmware 13.60) through dlopen of libSceRtc.sprx:
an empty fraction is accepted, any digits past the sixth are dropped,
text after the zone is ignored, the offset is applied without a range
check, and a 60th second returns 0 with the tick only shifted by the
offset.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-07 19:04:17 -03:00
Karan Shrivastava 954d6f19b1 fix(libSceRtc): answer out-of-range years in sceRtcGetDosTime
A year before 1980 or after 2107 cannot be packed into the DOS time, so
GetDosTime threw. Following the disassembly-derived fpPS4
reimplementation of the PS4 library, it now returns INVALID_YEAR after
writing 0 for an earlier year and 0xff9fbf7d, the largest encodable
time, for a later one. The TechnicalDebt entry now records fpPS4 as the
source for the SetDosTime year decode as well.
2026-10-07 17:18:42 -04:00
Adrià Franch 0781225d43 fix(rtc): decode the DOS year as unsigned, move TechnicalDebt line
Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-07 18:06:11 +02:00
Adrià Franch c94949aedb feat(rtc): implement sceRtcGetDosTime and sceRtcSetDosTime
Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-07 17:52:56 +02:00
Dean 1e6b1cb7eb
Merge pull request #804 from adriadam10/feat/rtc-format-rfc2822
feat(rtc): implement sceRtcFormatRFC2822 and the RFC 2822/3339 local-time formatters
2026-10-06 22:31:59 +13:00
Adrià Franch 3515ead91a feat(rtc): implement sceRtcFormatRFC2822 and the RFC 2822/3339 local-time formatters
Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-06 07:27:27 +02:00
Adrià Franch 4e5a1fe9d4 feat(rtc): parse RFC 2822 and asctime strings in sceRtcParseDateTime
Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-06 07:16:02 +02:00
Tomás Ortellado 3a30b5bae0 fix(rtc): reject invalid RFC 3339 formatting offsets 2026-10-05 08:37:55 -03:00
Nicolas Abosch 76b7294f06 fix(rtc): reject out-of-range source ticks in date arithmetic 2026-10-05 00:15:57 -03:00
Pouare514 e67d50cb2f fix(libs): route DateTime zone suffix through RFC3339 path, throw on unverified shapes 2026-10-05 01:10:25 +02:00
RomainROCH 44c9c77a7c fix(rtc): reject invalid RFC 3339 timezone offsets 2026-10-03 04:08:27 +02:00
Pacuka c0508a7f5f feat(rtc): implement libSceRtc date and tick functions
Ticks count microseconds since 0001-01-01 in the proleptic Gregorian
calendar, up to 9999-12-31 23:59:59.999999. Implement validation, tick
and date conversion, time_t and Win32 FILETIME conversion, UTC and
local time conversion through the host time zone, RFC 3339 formatting
and parsing, and tick arithmetic. Add sceRtcGetDaysInMonth,
sceRtcTickAddMonths and sceRtcTickAddYears, which clamp the day to the
end of the target month.

The network clock uses the host clock.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-26 12:21:23 +02:00