Skip to content

date: invalid format items should be emitted verbatim, and not cause an error #6635

@BenWiederhake

Description

@BenWiederhake

%s is the field for "number of seconds since UNIX epoch", and is the field for "doesn't make sense, so just emit verbatim".

$ date +%?
%?
$ cargo run -q date +%?
date: invalid format %?
[$? = 1]
$ date +%ö

$ cargo run -q date +%ö
date: invalid format %ö
[$? = 1]

Found while revising #6142.

This issue is closely related, but not identical to, #6398.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions