Skip to content

Add optional "localtimezone;" prefix for the recording directory (#497) - #3832

Open
mcfnord wants to merge 1 commit into
jamulussoftware:mainfrom
mcfnord:fix-497-recorder-localtime
Open

Add optional "localtimezone;" prefix for the recording directory (#497)#3832
mcfnord wants to merge 1 commit into
jamulussoftware:mainfrom
mcfnord:fix-497-recorder-localtime

Conversation

@mcfnord

@mcfnord mcfnord commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

Note

📡 STAND BY FOR AN LLM-AUTHORED MESSAGE.

Fixes #497.

This implements the design that was agreed in the issue thread in 2021 and — unusually — consolidated into the issue body itself as a buildable spec, at @gilgongo's request, by the reporter @victorypoint: an opt-in localtimezone; prefix on the existing recording-directory argument, using the ; separator format @corrados proposed for consistency with other combined command-line values.

./Jamulus -s -R "localtimezone;/home/test/jamulusrecordings"

With the prefix, recording session folders are named using local time, so they match the server log's own (local-time) timestamps without manual UTC-offset math. Without it, nothing changes: UTC remains the default, preserving the property discussed in the thread that folder names on multi-timezone public servers stay unambiguous unless the operator explicitly opts in.

How it works:

  • The prefix is recognised in CJamController::SetRecordingDir — the single chokepoint shared by all three ways of setting the directory (-R/ini, the server GUI, and JSON-RPC jamulusserver/setRecordingDirectory), so it behaves identically everywhere.
  • The stored/displayed directory string keeps the prefix, so it round-trips unchanged through the ini file, getRecorderStatus, and the GUI — a server started once with the prefix keeps the behaviour across restarts.
  • One bool is threaded through CJamRecorder to CJamSession, which picks QDateTime::currentDateTime() vs currentDateTimeUtc() for the session folder name. The folder-name format (Jam-yyyyMMdd-HHmmsszzz) is unchanged.
  • --help text and docs/JSON-RPC.md (regenerated with tools/generate_json_rpc_docs.py) are updated.

Deliberately not included: the issue body's secondary wish to also switch the folder-name format to ISO (yyyy-MM-dd HH:mm:ss). That would change the format for every existing server and any tooling that parses it; the agreed compromise was the opt-in prefix, so this PR does only that.

Testing (Linux, Qt 5): built clean; functional test ran a headless server with TZ=America/Los_Angeles and a headless client to trigger a session, twice: with -R "localtimezone;<dir>" the session folder carried the local (UTC−7) timestamp matching the server log line; with a plain -R <dir> it carried the UTC timestamp, byte-identical behaviour to before. A prefix-only value ("localtimezone;" with no path) degrades to the existing "recording not initialised" path.

…ussoftware#497)

Implements the design agreed in issue jamulussoftware#497: prefixing the recording
directory with "localtimezone;" (e.g.
-R "localtimezone;/path/to/recordings") names recording session
folders using local time instead of UTC, so they line up with the
server log's local-time entries. Without the prefix, behaviour is
unchanged (UTC remains the default).

The prefix is parsed in CJamController::SetRecordingDir, the common
path for the -R argument, the server GUI and JSON-RPC. The stored
directory string keeps the prefix so it round-trips through the ini
file and getRecorderStatus unchanged.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@pljones pljones added this to Tracking Jul 25, 2026
@github-project-automation github-project-automation Bot moved this to Triage in Tracking Jul 25, 2026
@pljones pljones added feature request Feature request AI AI generated or potentially AI generated labels Jul 25, 2026
@ann0see

ann0see commented Jul 25, 2026

Copy link
Copy Markdown
Member

Just FYI: I have no strong preference for or against this and would rather not want to decide on inclusion or exclusion of this feature. I'd leave this up to pljones and gilgongo if that's good?

@pljones

pljones commented Jul 26, 2026

Copy link
Copy Markdown
Collaborator

It's definitely been requested -- but I doubt there's many people running servers with recording who really care about it.

Not for 4.0.0, for sure. We've not fully scoped 4.1.0 but I'd rather just leave it on the project backlog for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

AI AI generated or potentially AI generated feature request Feature request

Projects

Status: Triage

Development

Successfully merging this pull request may close these issues.

Incorporate local timezone in jam recorder folder

3 participants