bug#80632: possible issue with date
PƔdraig Brady <[email protected]> Wed, 18 Mar 2026 09:00:58 +0000
| Newsgroups | gmane.comp.gnu.core-utils.bugs |
|---|---|
| Message-ID | <[email protected]> |
tag 80632 notabug close 80632 stop On 17/03/2026 19:40, Hayek, Khalil (he, him | il, lui) wrote: > UNCLASSIFIED - NON CLASSIFIĆ > > Good day, > > I noticed this behaviour of the "date" command today, and perhaps it is a bug, or it's by design. > > Running date -date="-5 days 4 hours" produces the date minus 5 days from now plus 4 hours, whereas the intent is more likely to be "-5 days and 4 hours". I tried it with other numbers of days and hours and observed the same behaviour. Running date -date="-5 days -4 hours" produces the expected time. That _is_ a bit of a gotcha, but I don't think we can change it at this stage as existing scripts may be depending on current behavior. closing this for now. thank you, Padraig