Accept more ISO8601 timestamp formats
Maintainers usually reply within 3 days
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 66/100
- Issue type
- Feature
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- haskell
- Domain
- build-system
Research direction
Start at cabal-install/src/Distribution/Client/IndexUtils/Timestamp.hs around lines 94-100, where the TODO sits and the existing parser handles @unix, full ISO8601 UTC and HEAD; read that parser and its error message closely before changing anything. Add the three forms listed (date-only as UTC midnight, minutes without seconds, numeric UTC offset) and extend the surrounding test module with one case per accepted form plus a rejection case. Done looks like --index-state=2026-06-01 and the other two examples parsing while local-time inputs still error.
Written by the indexing model from the issue text.
Description
I'd rather write just the shorter YYYY-MM-DD form of the timestamp, if that works so I'm promoting the above TODO note to a feature enhancement issue.
The behaviour at the moment is to get an error (with minor grammar glitches):
Error: cabal: invalid argument to option `--index-state': index-state must be
a unix-timestamps (e.g. '@1474732068'), a ISO8601 UTC timestamp (e.g.
'2016-09-24T17:47:48Z'), or 'HEAD'
I don't think we need a whole lot more forms of ISO8601 but a few that are more convenient. Anything that would parse to a local time we need to be wary of.
- A date on its own,
2026-06-01, meaning the start of that day in UTC. - A time without seconds,
2026-06-01T12:30Z(from the TODO). - A numeric UTC offset,
2026-06-01T12:00:00+12:00(from the TODO).
- Dominant language
- Haskell
- Stars
- 1.8k
- Forks
- 766
- Avg merge
- 5d 21h
- Merged PRs (30d)
- 27
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from haskell/cabal
-
needs triage type: enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 3 days
-
needs triage type: bug
Difficulty 2/5 1-3 hours Newbie friendliness 64/100
haskell/cabal#12568 · 1 comment ·
Maintainers usually reply within 3 days
-
needs triage type: bug
Difficulty 2/5 1-3 hours Newbie friendliness 67/100
haskell/cabal#12525 · 3 comments · 1 reaction ·
Maintainers usually reply within 3 days
-
Required version of `cabal-install` to build CabalPossibly taken @philderbeast claimed this 24 days ago. Opendocumentation type: discussion
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
haskell/cabal#12477 · 2 comments · 1 assignee ·
Maintainers usually reply within 3 days
-
Document which are our LTS releasesPossibly taken @KeuqS claimed this 41 days ago. Opendocumentation type: discussion
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
haskell/cabal#12373 · 2 comments ·
Maintainers usually reply within 3 days
Similar issues
-
bug desktop
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
simplex-chat/simplex-chat#8291 ·
Maintainers usually reply within 1 day
-
[BUG]: C# programs with top-level statements fail to compilePossibly taken @AsyncNigam claimed this today. Openbug
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
compiler-explorer/compiler-explorer#9625 · 1 comment ·
Maintainers usually reply within 1 day
-
reflex-0.10Open
Difficulty 1/5 Under an hour Newbie friendliness 62/100
commercialhaskell/stackage#8180 ·
Maintainers usually reply within 1 day
-
documentation
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
OpenZeppelin/canton-contracts#140 ·
Maintainers usually reply within 1 day
-
takeInterval yields nothing, dropInterval drops nothingPossibly taken @GuillaumedeVolpiano claimed this 1 day ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
composewell/streamly#3271 ·