Skip to content

iso-8601-style date with 12-hour time does not parse #9253

Closed

Description

@cg505
$ 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

Activity

  1. xtqqczze commented on Oct 12, 2026

    @xtqqczze
    Collaborator

    @anastygnome Looks like this was already fully resolved prior to #15111?

    $ git checkout a1976903ab4d722f8814553461eaa481d77ffcf1~1
    HEAD is now at 09a1ec1ec7 Don't build strace test for wasi
    $ 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= \
    cargo run -q date -d '2025-01-01 12:00am'
    Wed Jan  1 00:00:00 GMT 2025
  2. self-assigned this
    on Oct 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions