Latest Results
feat: allow quoted TZ and CRON_TZ values in spec strings (#337)
## Summary
Closes #335
Shell users habitually write `TZ="America/New_York"` or `TZ='UTC'` when
specifying timezones in cron specs. Previously these were rejected with
a confusing `invalid character '"'` error. Now matching single or double
quotes are stripped before validation.
## Changes
- **`parser.go`**: Strip matching quote pairs in `parseTimezone()`
before validation (5 lines)
- **`parser_test.go`**: 14 new test cases covering double-quoted,
single-quoted, mismatched, empty, and partial quote scenarios
- **`docs/adr/ADR-021-quoted-timezone-values.md`**: Documents the
decision, scope, and alternatives
- **README.md**, **DST_HANDLING.md**, **TROUBLESHOOTING.md**,
**COOKBOOK.md**: Updated with quoted timezone examples
## What's supported
| Input | Result |
|-------|--------|
| `TZ="UTC" * * * * *` | Parsed as `UTC` |
| `TZ='America/New_York' 0 5 * * *` | Parsed as `America/New_York` |
| `CRON_TZ="Asia/Tokyo" 30 4 * * *` | Parsed as `Asia/Tokyo` |
| `TZ=UTC * * * * *` | Still works (backwards-compatible) |
## What's NOT supported (by design)
| Input | Result | Rationale |
|-------|--------|-----------|
| `TZ="America/New York" ...` | Error | IANA names never contain spaces
|
| `TZ="UTC' ...` | Error | Mismatched quotes rejected |
| `TZ="" ...` | Error | Empty timezone after stripping |
## Test plan
- [x] 14 new test cases in `TestTimezoneQuotedValues`
- [x] All existing timezone tests pass (zero regressions)
- [x] Full test suite passes
- [x] Pre-push hooks pass (lint, vulncheck, tests) Active Branches
#336-34%
© 2026 CodSpeed Technology