mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-10 08:32:43 +00:00
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:
@@ -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 };
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user