Public bug reported:

On Ubuntu 26.04 (tested on the latest lxc image as of today), date seems
to require +%F to be last argument provided.

ubuntu@res-datetest:~$ date +%F --utc
date: extra operand '--utc'
ubuntu@res-datetest:~$ date +%F -d '2000-10-01'
date: extra operand '-d'

While this is in line with what the date man page states, the date
behavior in Ubuntu Resolute breaks what was previously working.

The +%F argument could be placed anywhere in the argument list, even on
25.10:


ubuntu@que-datetest:~$ grep PRETTY /etc/os-release 
PRETTY_NAME="Ubuntu 25.10"
ubuntu@que-datetest:~$ date +%F --utc
2026-02-24
ubuntu@que-datetest:~$ date +%F -d '2000-10-01'
2000-10-01

mario@MP52 ~> grep PRETTY /etc/os-release
PRETTY_NAME="Ubuntu 24.04.3 LTS"
mario@MP52 ~> date +%F --utc
2026-02-24
mario@MP52 ~> date +%F -d '2000-10-01'
2000-10-01

mario@enchilada:~$ grep PRETTY /etc/os-release 
PRETTY_NAME="Ubuntu 22.04.5 LTS"
mario@enchilada:~$ date +%F --utc
2026-02-24
mario@enchilada:~$ date +%F -d '2000-10-01'
2000-10-01
mario@enchilada:~$ 

(I know this one is super obsolete; I just wanted to show how date behaved for 
a VERY long time.)
mario@pic:~$ grep PRETTY /etc/os-release 
PRETTY_NAME="Ubuntu 14.04.6 LTS"
mario@pic:~$ date +%F --utc
2026-02-24
mario@pic:~$ date +%F -d '2000-10-01'
2000-10-01

** Affects: rust-coreutils (Ubuntu)
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2142586

Title:
  date complains if +%F is not the last argument

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/rust-coreutils/+bug/2142586/+subscriptions


-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to