fix: reject nonexistent zoned cron at-times

This commit is contained in:
Peter Steinberger
2026-03-23 21:11:48 -07:00
parent 69a317995d
commit 0857447a5d
4 changed files with 95 additions and 5 deletions

View File

@@ -109,10 +109,7 @@ export function parseAt(input: string, tz?: string): string | null {
// If a timezone is provided and the input looks like an offset-less ISO datetime,
// resolve it in the given IANA timezone so users get the time they expect.
if (tz && isOffsetlessIsoDateTime(raw)) {
const resolved = parseOffsetlessIsoDateTimeInTimeZone(raw, tz);
if (resolved) {
return resolved;
}
return parseOffsetlessIsoDateTimeInTimeZone(raw, tz);
}
const absolute = parseAbsoluteTimeMs(raw);