Skip to content

bug(date): when using -d option, it trusts the weekday #12943

Description

@HackingRepo

Hi, uutils mainteners

our testing confirms the uu date command trusts Wednesday august 17 and returns it, while the gnu one it ignores the weekday
and say Monday which correct, august 17 in Monday

relunsec@relunsec:~/software/coreutils/target/debug$ gnudate -d "WEDNESDAY August 17" --debug
date: parsed day part: Wed (day ordinal=0 number=3)
date: parsed date part: (Y-M-D) 2026-08-17
date: input timezone: system default
date: warning: using midnight as starting time: 00:00:00
date: warning: day (Wed) ignored when explicit dates are given
date: starting date/time: '(Y-M-D) 2026-08-17 00:00:00'
date: '(Y-M-D) 2026-08-17 00:00:00' = 1786939200 epoch-seconds
date: timezone: system default
date: final: 1786939200.000000000 (epoch-seconds)
date: final: (Y-M-D) 2026-08-17 04:00:00 (UTC)
date: final: (Y-M-D) 2026-08-17 00:00:00 (UTC-04)
gnudate: output format: ‘%a %b %e %r %Z %Y’
Mon Aug 17 12:00:00 AM EDT 2026
relunsec@relunsec:~/software/coreutils/target/debug$ ./date -d "WEDNESDAY August 17" --debug
date: input string: WEDNESDAY August 17
date: parsed date part: (Y-M-D) 2026-08-19
date: parsed time part: 00:00:00
date: input timezone: system default
date: warning: using midnight as starting time: 00:00:00
Wed Aug 19 12:00:00 AM EDT 2026
relunsec@relunsec:~/software/coreutils/target/debug$ 

as i sad, gnu date it ignores the weekday in explicit dates while the uu one just returns wednesday august 17

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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