the log day now starts at 6am, because the playtesters are night owls
A midnight boundary splits one evening across two files at exactly the moment the session is most worth reading whole: the 01:30 crash lands in a different file from the 23:00 run that set it up. And a 02:00 session is "last night" to everyone who was in it, so filing it under the new calendar date reads wrong even when nothing goes bad. So shift the clock back 6h before taking the date for the FILENAME. The log day runs 06:00 -> 06:00 and one night stays in one file. Only the filename moves. The session header and the lastrun breadcrumb each call GetLocalTime separately (three distinct SYSTEMTIMEs in this function), so every timestamp a human reads is still true local time -- checked the scoping rather than assuming it, since sharing one variable would have silently backdated the header by six hours. FileTimeToSystemTime carries the month and year boundaries, verified against a scratch harness rather than reasoned about: 2026-07-28 20:00 -> solo_20260728.log one playtest night, 2026-07-28 23:59 -> solo_20260728.log start to finish, 2026-07-29 00:01 -> solo_20260728.log in a single file 2026-07-29 05:59 -> solo_20260728.log 2026-07-29 06:00 -> solo_20260729.log the boundary 2026-08-01 01:00 -> solo_20260731.log month 2027-01-01 03:00 -> solo_20261231.log year 2026-03-01 02:00 -> solo_20260228.log non-leap February Nothing in the tooling parses these filenames -- the operator app's own log is operator_relay.log and _collect_egg is mission settings, not logs -- so the console auto-transfer is unaffected. The player-facing text did need fixing though: the bats and README told players to send the log "dated today", which is now wrong for anyone who plays past midnight. They now say to take the NEWEST one and ignore the date, with a note on why. That was already the safer instruction. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Fable 5
parent
ca6718a876
commit
5fc969ae95
@@ -605,6 +605,35 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine
|
||||
SYSTEMTIME lt;
|
||||
GetLocalTime(<); // NOT cmd's %DATE%: locale-ordered, and
|
||||
// on en-US it contains '/' (path chars).
|
||||
|
||||
// THE LOG DAY STARTS AT 06:00 LOCAL, NOT MIDNIGHT. Playtests run
|
||||
// late, and a midnight boundary splits one evening across two files
|
||||
// exactly when the session is most worth reading whole -- the 01:30
|
||||
// crash lands in a different file from the 23:00 run that set it up.
|
||||
// (A 02:00 session is also "last night" to everyone who was in it,
|
||||
// so a file named for the new calendar date reads wrong anyway.)
|
||||
// Shift the clock back 6h before taking the date: the log day then
|
||||
// runs 06:00 -> 06:00 and one night is one file. Only the FILENAME
|
||||
// is shifted -- every line inside still carries real local time, and
|
||||
// the session header still records the true date.
|
||||
{
|
||||
const ULONGLONG LogDayStartHour = 6;
|
||||
FILETIME ft;
|
||||
if (SystemTimeToFileTime(<, &ft)) // pure arithmetic; no TZ
|
||||
{ // conversion either way
|
||||
ULARGE_INTEGER u;
|
||||
u.LowPart = ft.dwLowDateTime;
|
||||
u.HighPart = ft.dwHighDateTime;
|
||||
u.QuadPart -= LogDayStartHour * 3600ULL * 10000000ULL; // 100ns
|
||||
ft.dwLowDateTime = u.LowPart;
|
||||
ft.dwHighDateTime = u.HighPart;
|
||||
SYSTEMTIME shifted;
|
||||
// FileTimeToSystemTime carries month/year boundaries for us,
|
||||
// so 01:00 on the 1st correctly names the previous month.
|
||||
if (FileTimeToSystemTime(&ft, &shifted))
|
||||
lt = shifted;
|
||||
}
|
||||
}
|
||||
// SIZE ROLL-OVER -- never deletes anything, but keeps each FILE small
|
||||
// enough to actually send. A playtest evening concatenates into one
|
||||
// file (4.3 MB from a single session in scratchpad/night5/), and the
|
||||
|
||||
+7
-3
@@ -41,9 +41,13 @@ a crash loses it) or if you were playing SOLO or over STEAM (no relay
|
||||
to upload through).
|
||||
IF ANYTHING CRASHED OR MISBEHAVED, send BOTH of these -- neither is ever
|
||||
uploaded, they only exist on your machine:
|
||||
content\join_YYYYMMDD.log today's date; the NEWEST one. There is now
|
||||
ONE log per day holding every session, so a
|
||||
crash is no longer erased when you relaunch.
|
||||
content\join_YYYYMMDD.log just take the NEWEST one; do not go by the
|
||||
date in the name. A log DAY runs 6am to 6am,
|
||||
so whatever you played after midnight is still
|
||||
filed under the evening you started -- one
|
||||
night stays in one file. There is ONE log per
|
||||
day holding every session, so a crash is no
|
||||
longer erased when you relaunch.
|
||||
Each session inside it starts with a line
|
||||
"===== BT411 SESSION ... =====" naming your
|
||||
build and PC, so it still identifies itself
|
||||
|
||||
@@ -95,13 +95,16 @@ if defined BT_STILL_RUNNING (
|
||||
echo.
|
||||
echo The game has exited. If it closed unexpectedly, send the operator
|
||||
echo BOTH of these from the content folder:
|
||||
echo content\lastrun_solo.txt (tiny -- send it EVEN IF there is no
|
||||
echo log dated today: that combination is
|
||||
echo how we spot a blocked launch)
|
||||
echo content\lastrun_solo.txt (tiny -- send it EVEN IF there is
|
||||
echo no solo_*.log at all: that combination
|
||||
echo is how we spot a blocked launch)
|
||||
echo content\solo_YYYYMMDD.log
|
||||
echo (the newest solo_*.log -- it holds every session from today, and each
|
||||
echo one starts with a "===== BT411 SESSION" line naming your build and PC,
|
||||
echo so it identifies itself even if the filename gets changed in transit.)
|
||||
echo (just take the NEWEST solo_*.log -- do not go by the date in the name.
|
||||
echo A log day runs 6am to 6am, so anything you played after midnight is
|
||||
echo still filed under the evening you started, which keeps one night in
|
||||
echo one file. Each session inside starts with a "===== BT411 SESSION"
|
||||
echo line naming your build and PC, so it identifies itself even if the
|
||||
echo filename gets changed in transit.)
|
||||
pause
|
||||
exit /b
|
||||
:badpath
|
||||
|
||||
@@ -88,10 +88,13 @@ if defined BT_STILL_RUNNING (
|
||||
)
|
||||
echo.
|
||||
echo The game has exited. If it closed unexpectedly, send the operator BOTH
|
||||
echo content\lastrun_steam.txt (tiny -- send it EVEN IF there is no log
|
||||
echo dated today: that is how we spot a
|
||||
echo launch that was blocked before it ran)
|
||||
echo content\steam_YYYYMMDD.log (today's, newest)
|
||||
echo content\lastrun_steam.txt (tiny -- send it EVEN IF there is no
|
||||
echo steam_*.log at all: that is how we spot
|
||||
echo a launch blocked before it ran)
|
||||
echo content\steam_YYYYMMDD.log (just the NEWEST one -- ignore the date.
|
||||
echo A log day runs 6am to 6am, so a session
|
||||
echo after midnight stays filed under the
|
||||
echo evening you started.)
|
||||
echo Steam not running = the menu still works but lobbies will not appear.
|
||||
pause
|
||||
exit /b
|
||||
|
||||
Reference in New Issue
Block a user