Skip to content

date: --date=month and --date=year return wrong date and time #4811

@cakebaker

Description

@cakebaker

With GNU date:

$ date
Mon May  1 10:36:23 AM CEST 2023
$ date --date=month
Thu Jun  1 10:36:49 AM CEST 2023
$ date --date=year
Wed May  1 10:36:56 AM CEST 2024

With uutils date:

$ cargo run date
Mon May  1 10:37:59 2023
$ cargo run date --date=month
Wed May 31 08:38:06 2023
$ cargo run date --date=year
Tue Apr 30 08:38:12 2024

The time is also incorrect when using --date=week, --date=day, --date=hour, etc.

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