[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#37921: date -d "a day ago" differs from date -d "1 day ago"
From: |
Bernhard Voelker |
Subject: |
bug#37921: date -d "a day ago" differs from date -d "1 day ago" |
Date: |
Fri, 25 Oct 2019 18:04:37 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.1.0 |
On 2019-10-25 15:59, Matt Carter wrote:
> + date -d 'a day ago'
Please look at the output with --debug.
$ date --debug -d 'a day ago'
date: parsed zone part: UTC-01
[...]
The first 'a' is not parsed [1] as a synonym for "one day", but
rather as the "A" military timezone [2].
[1]
https://git.sv.gnu.org/cgit/gnulib.git/tree/lib/parse-datetime.y?id=06011ed74e#n1161
[2] https://en.wikipedia.org/wiki/List_of_military_time_zones
Have a nice day,
Berny