Commit Graph
6 Commits
Author SHA1 Message Date
JJenkx 5d02c43cc5 fix(libc): avoid moving in-range calendars across time-zone history 2026-10-28 16:10:11 -04:00
JJenkxandClaude Opus 5.5 ba5890f3c0 fix(libc): normalize a pre-1970 calendar before the Windows host mktime
On Windows, mktime handed a calendar whose fields were out of range
straight to the UCRT mktime, which refuses a tm_year below 69 before
normalizing. A guest calendar such as year 68 with month 24 (February
1970), or 1969-12-45, therefore returned -1 and left the fields
unchanged, although the date is representable. The libc.prx that titles
ship (PPSA07923, PPSA05916) normalizes and converts these.

mktime already computes the normalized UTC seconds of the fields; it now
rebuilds the host calendar from them whenever the fields are not already
ordinary, not only when the date lies outside the host range.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-28 15:11:06 -04:00
boykopovar f38d29fd08 refactor(sdk): add canonical headers for remaining libraries 2026-10-24 23:17:42 +03:00
Hussein Kadhim 7d1140d962 fix(libc): apply the guest TZ to tzset, localtime, mktime and strftime
Guest setenv, putenv and unsetenv only change the guest environment, while
the time conversions read the host TZ, so a guest that set TZ and called
tzset still got host local time. Copy a changed guest TZ to the host before
each local conversion and call tzset again.
2026-10-19 13:03:54 +02:00
David 7126090654 fix(libc): convert local times before 1970 and after 3000 on Windows 2026-10-13 01:47:03 +00:00
BharatYadav007 f0e852ae27 fix(libc): normalize valid mktime minus-one results 2026-10-12 10:18:20 +05:30