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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Incorporate local timezone in jam recorder folder

1 participant