Simplify timestampPrefix: bool or timezone string, default true

- timestampPrefix: true (UTC), false (off), or 'America/New_York'
- Removed separate timestampTimezone option
- Default is now enabled (true/UTC) unless explicitly false
This commit is contained in:
Peter Steinberger
2025-11-29 05:29:29 +00:00
parent 7564c4e7f4
commit 8d20edb028
3 changed files with 9 additions and 9 deletions

View File

@@ -562,10 +562,13 @@ export async function monitorWebProvider(
lastInboundMsg = msg;
// Build timestamp prefix if enabled
// Build timestamp prefix (default: enabled with UTC)
// Can be: true (UTC), false (disabled), or "America/New_York" (custom timezone)
let timestampStr = "";
if (cfg.inbound?.timestampPrefix) {
const tz = cfg.inbound?.timestampTimezone ?? "UTC";
const tsCfg = cfg.inbound?.timestampPrefix;
const tsEnabled = tsCfg !== false; // default true
if (tsEnabled) {
const tz = typeof tsCfg === "string" ? tsCfg : "UTC";
const now = new Date();
try {
// Format: "Nov 29 06:30" - compact but informative