Repository navigation
Conversation
… UTC
KernelTimezoneIsUtc ran before the test set TZ and required
sceKernelGettimezone to report {0, 0}. Since boykopovar#10499 that call reports
the host zone, as a PS5 does, so the check failed on any machine not
set to UTC. Its null pointer and UTC assertions remain in
TimezoneReportsTheStandardOffsetAndDaylightAmount, which sets TZ.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
rooklz
left a comment
There was a problem hiding this comment.
Host-side review for the platforms the body lists as Not tested (Linux, macOS). I made no console measurements.
Harness. I extracted HostZone/HostZoneAt/HostDaylightAmount/sceKernelGettimezone verbatim from core/libs/prx/libkernel/Time/Time.cpp @ 3a2b919816 (lines 763-803 and 844-849). GuestCopyOut_nid_no_patch is shimmed as a memcpy. On top of that I ran main's KernelTimezoneIsUtc body unchanged. TZ is set from outside the process, the way the zone is set before main() reaches any SetTimeZone.
TZ |
macOS 26 arm64, Apple clang (host /etc/localtime = Europe/London) |
Ubuntu 24.04 x86_64, GCC, glibc 2.39 (container /etc/localtime = Etc/UTC) |
|---|---|---|
| unset | {0,60} → abort |
{0,0} pass |
UTC0 / Etc/UTC |
{0,0} pass |
{0,0} pass |
Europe/London |
{0,60} → abort |
{0,60} → abort |
EST5EDT / America/New_York |
{-300,60} → abort |
{-300,60} → abort |
IST-5:30 / Asia/Kolkata |
{330,0} → abort |
{330,0} → abort |
Africa/Accra, Atlantic/Reykjavik |
{0,0} pass |
n/a |
This confirms the body's analysis on Linux and macOS too. The deleted check passes only when the host zone has offset 0 and no daylight saving at all. A UK host fails it all year round, because sceKernelGettimezone reports the zone's daylight amount (60), not whether daylight saving is in effect now. So a "GMT" machine is not safe. CI passes only because the runners and containers are Etc/UTC.
Coverage. Nothing is lost:
- The null →
0x8002000Eassertion is repeated at L309. {0,0}underUTC0is the firstRequireTimezonerow (L304), and that row now runs withTZset explicitly.- No other check before
TimezoneReportsTheStandardOffsetAndDaylightAmountreads the host zone. Thegettimeofdayzone check at L342 readsguestTimezone, not the host. - The
EST5EDT/CET-1CESTrows compare the daylight amount, not the current DST state, so they don't depend on the date.
Head ab03f37893 is base 3a2b919816 minus exactly these 7 lines. LGTM.
|
Windows confirmation on a host that isn't on UTC, the case this fixes: Windows 11 time zone
AI-assisted: yes (Claude Code) |
|
Linux run at this PR's exact head Arch Linux, kernel 7.2.9, Ryzen 9 7950X, g++ (GCC) 16.2.1 20260810, glibc 2.44, x86-64. Release,
This is an actual Linux build and run of the changed test, alongside the existing host-side review. |
|
Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap.
|
|
Cross-reference: #12418 ( AI-assisted: yes (Claude Code). |
|
Refreshed on current With this head ( AI-assisted: yes (Claude Code). |
|
@JJenkx #12418 (mine) adds AI-assisted: yes (Claude Code) |
|
@babyhuey agreed: #12660 first, then #12418. Thanks for recording the dependency on #12418. This PR's own checklist needs no AI-assisted: yes (Claude Code). |
|
Agreed: #12660 lands first, then #12418. babyhuey’s confirmation records #12418’s dependency. This PR has no dependency on #12418. Its non-UTC clock assertions need this timezone correction; #12418’s separate guest-copy fast-path prerequisite remains its author’s responsibility. This records the landing order without adding a new runtime claim. AI-assisted: yes (Codex). |
|
The refreshed overlap review identifies #12747 ( Please choose one of #12660 and #12747 before merging; I favor the deletion here because the remaining clock/offset checks already cover the contract. I am keeping this useful reviewed PR open pending that choice. The separately agreed order with babyhuey remains #12660 first, then #12418 if this alternative is selected. No dependency on #12747 is claimed. The earlier clean merge previews do not establish that these alternatives should be combined. AI-assisted: yes (Codex). |
|
#12747 merged (19:22 UTC) and fixes the same host-timezone assumption by pinning the zone inside AI-assisted: yes (Claude Code). |
What
guest_freebsd_clocksfails on any machine whose time zone isn't UTC. This PR removes the check responsible.KernelTimezoneIsUtc(added by #11546) runs first inmain(), before the test setsTZ. It requiressceKernelGettimezoneto report{0, 0}. Since #10499, that call reports the host zone's standard offset and daylight saving amount, as frankea measured on a PS5 set to US Eastern (-300,60). So on a host in another zone, the check sees the host zone and aborts. CI and the machines #11546 was tested on run in UTC, so it passed there.The check adds no coverage. Both of its assertions are already in
TimezoneReportsTheStandardOffsetAndDaylightAmount, which setsTZfirst:0x8002000E;UTC0reports{0, 0}.So this PR deletes
KernelTimezoneIsUtcand its call. No library code changes.Tested
Windows 11 set to Eastern Standard Time, WinLibs GCC 15.2.0 UCRT r7, Release,
main3a2b919816.TZmain--repeat until-fail:3)ctest -j32runEST5EDTUTC0IST-5:30CET-1CESTOn
main, a temporary line-number print inRequirelocates the abort at the zone check inKernelTimezoneIsUtc.Conventions pass.
tools/pr_overlap.py: three open PRs share the file (#9658 and #12418 among them), and all merge cleanly with this branch.Not tested: Linux and macOS. The check does the same thing there whenever the host zone isn't UTC.
Agreed landing order — 2026-10-29
Agreed: #12660 lands first, then #12418. babyhuey’s confirmation records #12418’s dependency. This PR has no dependency on #12418. Its non-UTC clock assertions need this timezone correction; #12418’s separate guest-copy fast-path prerequisite remains its author’s responsibility. This records the landing order without adding a new runtime claim.
AI-assisted: yes (Codex).
Alternative-fix overlap — 2026-10-29
The refreshed overlap review identifies #12747 (
222a178f7f) as an alternative fix for the same host-timezone assertion, rather than a prerequisite: it initializes UTC insideKernelTimezoneIsUtc, while this PR removes the redundant assertion and its call. #12809 is closed as a duplicate of #12747. These should not all land.Please choose one of #12660 and #12747 before merging; I favor the deletion here because the remaining clock/offset checks already cover the contract. I am keeping this useful reviewed PR open pending that choice. The separately agreed order with babyhuey remains #12660 first, then #12418 if this alternative is selected. No dependency on #12747 is claimed. The earlier clean merge previews do not establish that these alternatives should be combined.
AI-assisted: yes (Codex).
Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (attach them to this PR)🤖 Generated with Claude Code