mirror of https://github.com/openclaw/openclaw.git
fix(heartbeat): constrain 24-hour sentinel to 24:00 only in regex
The previous pattern /^([01]\d|2[0-3]|24):([0-5]\d)$/ matched 24:01-24:59 because the 24 alternative was not restricted to :00. Restructured the regex so only the literal string "24:00" is accepted as the end-of-day sentinel. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
399781aaca
commit
5d54a2f953
|
|
@ -4,7 +4,7 @@ import type { AgentDefaultsConfig } from "../config/types.agent-defaults.js";
|
|||
|
||||
type HeartbeatConfig = AgentDefaultsConfig["heartbeat"];
|
||||
|
||||
const ACTIVE_HOURS_TIME_PATTERN = /^([01]\d|2[0-3]|24):([0-5]\d)$/;
|
||||
const ACTIVE_HOURS_TIME_PATTERN = /^(?:([01]\d|2[0-3]):([0-5]\d)|24:00)$/;
|
||||
|
||||
function resolveActiveHoursTimezone(cfg: OpenClawConfig, raw?: string): string {
|
||||
const trimmed = raw?.trim();
|
||||
|
|
|
|||
Loading…
Reference in New Issue