Bug type
Regression (worked before, now fails)
Beta release blocker
No
Summary
test(cron): add comprehensive timezone parsing test coverage
Steps to reproduce
test(cron): add comprehensive timezone parsing test coverage
Expected behavior
test(cron): add comprehensive timezone parsing test coverage
Actual behavior
test(cron): add comprehensive timezone parsing test coverage
OpenClaw version
2026.06.09
Operating system
Ubuntu24.04
Install method
pnpm dev
Model
minimax
Provider / routing chain
openclaw
Additional provider/model setup details
test(cron): add comprehensive timezone parsing test coverage
Problem
The parseAbsoluteTimeMs function in src/cron/parse.ts handles ISO 8601 timestamp parsing for cron schedules, but the existing test coverage was minimal (only 2 test cases). This left several edge cases untested:
- Different timezone offset formats (
+HH:MM, -HH:MM, +HHMM, -HHMM)
- UTC indicator variations (
Z, z)
- Sub-second precision (milliseconds, microseconds, nanoseconds)
- Timezone edge cases (half-hour offsets like
+05:30, 45-minute offsets like +12:45)
- Maximum/minimum timezone offsets (
+14:00, -12:00)
- Whitespace handling
- Invalid format rejection
Solution
Added comprehensive test coverage with 39 test cases organized into logical groups:
- Epoch milliseconds - Tests numeric timestamp parsing and rejection of out-of-range values
- ISO 8601 date only - Tests date-only strings normalized to midnight UTC
- ISO 8601 datetime without timezone - Tests implicit UTC assumption
- ISO 8601 with Z (UTC) timezone - Tests various UTC indicators including sub-second precision
- ISO 8601 with timezone offset (colon format) - Tests standard
±HH:MM formats including edge cases
- ISO 8601 with timezone offset (no colon format) - Tests
±HHMM format compatibility
- ISO 8601 with milliseconds and timezone - Tests combined sub-second precision with timezones
- Whitespace handling - Tests trimming and empty string rejection
- Invalid formats - Tests rejection of truly malformed date strings
- Edge cases - Tests leap years, year boundaries, and realistic timestamp ranges
- Real-world cron examples - Tests common scheduling scenarios
Testing
All 39 tests pass successfully, providing confidence that the parser correctly handles:
- Standard ISO 8601 formats used in cron scheduling
- International timezone formats (Beijing +08:00, EST -05:00, IST +05:30, etc.)
- High-precision timestamps for sub-second scheduling requirements
- Graceful rejection of invalid inputs
Files Changed
src/cron/parse.test.ts - Expanded from 2 to 39 comprehensive test cases
Logs, screenshots, and evidence
Impact and severity
No response
Additional information
No response
Bug type
Regression (worked before, now fails)
Beta release blocker
No
Summary
test(cron): add comprehensive timezone parsing test coverage
Steps to reproduce
test(cron): add comprehensive timezone parsing test coverage
Expected behavior
test(cron): add comprehensive timezone parsing test coverage
Actual behavior
test(cron): add comprehensive timezone parsing test coverage
OpenClaw version
2026.06.09
Operating system
Ubuntu24.04
Install method
pnpm dev
Model
minimax
Provider / routing chain
openclaw
Additional provider/model setup details
test(cron): add comprehensive timezone parsing test coverage
Problem
The
parseAbsoluteTimeMsfunction insrc/cron/parse.tshandles ISO 8601 timestamp parsing for cron schedules, but the existing test coverage was minimal (only 2 test cases). This left several edge cases untested:+HH:MM,-HH:MM,+HHMM,-HHMM)Z,z)+05:30, 45-minute offsets like+12:45)+14:00,-12:00)Solution
Added comprehensive test coverage with 39 test cases organized into logical groups:
±HH:MMformats including edge cases±HHMMformat compatibilityTesting
All 39 tests pass successfully, providing confidence that the parser correctly handles:
Files Changed
src/cron/parse.test.ts- Expanded from 2 to 39 comprehensive test casesLogs, screenshots, and evidence
Impact and severity
No response
Additional information
No response