iso-8601-style date with 12-hour time does not parse
Open
Nobody has claimed this yet.
U - date
- Dominant language
- Rust
- Stars
- 24.1k
- Forks
- 2k
- Avg merge
- 1d 5h
- Merged PRs (30d)
- 365
Description
$ date -d '2025-01-01 12:00am'
date: invalid date '2025-01-01 12:00am'
This works with GNU date (coreutils 9.8).
Interestingly, 01/01/2025 12:00am and 2025-01-01 00:00 both parse, suggesting it may be some kind of mixed-locale issue?
$ locale
LANG=en_US.UTF-8
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_PAPER="en_US.UTF-8"
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT="en_US.UTF-8"
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL=
$ date --version
date (uutils coreutils) 0.4.0
Arch Linux
Contributor 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.
Research direction
Start by reproducing the failing date -d '2025-01-01 12:00am' command and compare it with the working numeric-time and slash-date examples in the report. Trace the date command's input parsing entry point and verify the fix against the reported locale and GNU coreutils behavior; done means the ISO-8601-style date with 12-hour midnight parses correctly without regressing the existing examples.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100