[PR #3177] [MERGED] Screenshots are named in local time, and the log says where they went #4830

Closed
opened 2026-11-03 05:08:16 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/3177
Author: @senjinthedragon
Created: 10/28/2026
Status: ✅ Merged
Merged: 10/29/2026
Merged by: @levzzz5154

Base: main ← Head: screenshot-log


📝 Commits (2)

  • 70e3fe0 Screenshots are named in local time, and the log says where they went
  • 64981e9 Screenshots: the name's doc says local time, as the code now does

📊 Changes

1 file changed (+4 additions, -17 deletions)

View changed files

📝 crates/horizon-client/src/game/chat.rs (+4 -17)

📄 Description

🤖 Opened by Senjin's AI agent (Claude Code), not by Senjin.

What and why

Two small things about F2 screenshots:

  • Their names were in UTC. screenshot_name worked the date and time out of the Unix clock by hand, without a
    time zone. Vanilla's Util.getFilenameFormattedDateTime formats the local date and time (yyyy-MM-dd_HH.mm.ss), and
    so does Horizon's own log. A screenshot taken at 12:28 in CET was named …_11.28.27.png, and near midnight it can
    get the wrong date. It now uses chrono::Local, as logging.rs does. The _2, _3 suffixes are unchanged.
  • The log didn't say where a screenshot went. Vanilla's chat line, [CHAT] Saved screenshot as <file name>,
    reaches latest.log but names only the file, and Horizon writes chat lines to the log file only. The log now
    also gets Saved screenshot to <full path>. The chat line is unchanged.

Vanilla reference

Screenshot.grab → Util.getFilenameFormattedDateTime (local time). The chat message and its click-to-open link are
unchanged.

Self-check

pr_ready (tools/pr_ready.py --quick on 9e02bdfc67b0, against origin/main at b6c936f82, 1 min 44 s)

Check Result
Scope ✅ 1 files, +3 −15
Cargo.lock ✅ unchanged
Public tree ✅ (1 s)
Python tests ✅ 398 passed (33 s)
rustfmt ✅ (8 s)
clippy ✅ (19 s)
tests: horizon-client ✅ 1261 passed (33 s)
doc tests ✅ 0 passed (11 s)
Parity ➖ not run (--quick): CI's parity job picks the affected harnesses
Label player-facing: feature if players get something new, no label for a fix (release-now if urgent)

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/horizon-rust/horizon/pull/3177 **Author:** [@senjinthedragon](https://github.com/senjinthedragon) **Created:** 10/28/2026 **Status:** ✅ Merged **Merged:** 10/29/2026 **Merged by:** [@levzzz5154](https://github.com/levzzz5154) **Base:** `main` ← **Head:** `screenshot-log` --- ### 📝 Commits (2) - [`70e3fe0`](https://github.com/horizon-rust/horizon/commit/70e3fe006d8e6f4e9b3ecea57221f7bd4032e5e7) Screenshots are named in local time, and the log says where they went - [`64981e9`](https://github.com/horizon-rust/horizon/commit/64981e95b733c3468454d86fcd8550479c2bfae5) Screenshots: the name's doc says local time, as the code now does ### 📊 Changes **1 file changed** (+4 additions, -17 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/game/chat.rs` (+4 -17) </details> ### 📄 Description > 🤖 Opened by Senjin's AI agent (Claude Code), not by Senjin. ## What and why Two small things about F2 screenshots: - **Their names were in UTC.** `screenshot_name` worked the date and time out of the Unix clock by hand, without a time zone. Vanilla's `Util.getFilenameFormattedDateTime` formats the local date and time (`yyyy-MM-dd_HH.mm.ss`), and so does Horizon's own log. A screenshot taken at 12:28 in CET was named `…_11.28.27.png`, and near midnight it can get the wrong date. It now uses `chrono::Local`, as `logging.rs` does. The `_2`, `_3` suffixes are unchanged. - **The log didn't say where a screenshot went.** Vanilla's chat line, `[CHAT] Saved screenshot as <file name>`, reaches `latest.log` but names only the file, and Horizon writes chat lines to the log file only. The log now also gets `Saved screenshot to <full path>`. The chat line is unchanged. ## Vanilla reference `Screenshot.grab` → `Util.getFilenameFormattedDateTime` (local time). The chat message and its click-to-open link are unchanged. ## Self-check **pr_ready** (`tools/pr_ready.py --quick` on 9e02bdfc67b0, against origin/main at b6c936f82, 1 min 44 s) | Check | Result | | --- | --- | | Scope | ✅ 1 files, +3 −15 | | Cargo.lock | ✅ unchanged | | Public tree | ✅ (1 s) | | Python tests | ✅ 398 passed (33 s) | | rustfmt | ✅ (8 s) | | clippy | ✅ (19 s) | | tests: horizon-client | ✅ 1261 passed (33 s) | | doc tests | ✅ 0 passed (11 s) | | Parity | ➖ not run (--quick): CI's parity job picks the affected harnesses | | Label | player-facing: `feature` if players get something new, no label for a fix (`release-now` if urgent) | --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 05:08:16 +07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
horizon-rust/horizon#4830
No description provided.