SetLocalTime virtual calendar

Source task based on main 9c522d88962456badb51409a7180d7d41e87463a. Original Mad Bomber evidence is retained by the LockFile task in scratch/runs/20261019-madbomber-original-remote-v2: its packed CRT resolves LockFile/UnlockFile, then fails to resolve SetLocalTime and returns FALSE from its initializer. This change does not establish an original-game pass.

SetLocalTime already has immutable API id 627. Its fail-fast handler is now implemented, and the explicit kernel32 export manifest adds emulator ordinal 593 without changing any existing ordinal or API id. The generated PE export body is regenerated. Dispatch and hash generators leave their mirrors unchanged.

The handler gathers a read-only 16-byte guest SYSTEMTIME, releases its span, returns BOOL, and pops one stdcall argument. Invalid/null input returns FALSE and ERROR_INVALID_PARAMETER (87); success preserves LastError. Day of week is ignored. Calendar fields are validated before changing state, including month length, leap years, milliseconds and supported years 1601..30827.

The existing wall_clock import gains mode 4; its signature does not change. A process-owned calendar object holds an offset from the existing late-bound calendar policy. GetLocalTime, GetSystemTime, FILETIME, current timezone bias, CRT consumers of those APIs, and CMOS sample that object. Cooperative workers share it; real workers use the existing synchronous import broker. Other guest processes remain isolated. No operating-system clock call is made. get_ticks, real_time_ms, RDTSC and elapsed-time/audio timing policies are unchanged.

Microsoft specifies conversion using the bias at the current time, including the current DST setting. Setting across a DST boundary can therefore require a second call. This is intentionally different from resolving the target local date's own timezone offset. See SetLocalTime and Local Time. This is guest-only virtual time with no Windows privilege/token model or host SE_SYSTEMTIME_NAME authorization; it does not implement SetSystemTime or SetTimeZoneInformation. Existing host timezone rules remain the zone policy.

Validation: node test/test-set-local-time.js and node test/test-cmos-rtc.js pass without a build, guest or OS Worker. The new host suite covers invalid inputs with unchanged clock, leap day/century, time progression, FILETIME, fractional timezone, DST two-call behavior, isolated processes, cooperative workers, production browser context reconstruction and unchanged elapsed clocks.

Prepared controls, not yet executed:

A normal build and these controls require coordinator runtime allocation. Original Mad Bomber validation must then use the original executable/CRT and an independently reviewed bounded run. No public deployment is authorized.