feat: append UTC time alongside local time in shared Current time lines (#32423)

Merged via squash.

Prepared head SHA: 9e8ec13933
Co-authored-by: jriff <50276+jriff@users.noreply.github.com>
Co-authored-by: altaywtf <9790196+altaywtf@users.noreply.github.com>
Reviewed-by: @altaywtf
This commit is contained in:
Jacob Riff
2026-03-05 14:26:34 -08:00
committed by GitHub
parent 49acb07f9f
commit aad372e15f
6 changed files with 15 additions and 10 deletions

View File

@@ -25,7 +25,8 @@ export function resolveCronStyleNow(cfg: TimeConfigLike, nowMs: number): CronSty
const userTimeFormat = resolveUserTimeFormat(cfg.agents?.defaults?.timeFormat);
const formattedTime =
formatUserTime(new Date(nowMs), userTimezone, userTimeFormat) ?? new Date(nowMs).toISOString();
const timeLine = `Current time: ${formattedTime} (${userTimezone})`;
const utcTime = new Date(nowMs).toISOString().replace("T", " ").slice(0, 16) + " UTC";
const timeLine = `Current time: ${formattedTime} (${userTimezone}) / ${utcTime}`;
return { userTimezone, formattedTime, timeLine };
}