[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: |
Matt Carter |
Subject: |
bug#37921: date -d "a day ago" differs from date -d "1 day ago" |
Date: |
Fri, 25 Oct 2019 13:59:07 +0000 |
When I ask date(1) for the date "a day ago", I get a different result from
when I ask date(1) for the date "1 day ago".
The results differ by 3 hours.
If I ask for UTC time, the results differ by 1 hour.
I'm not able to find anything in the manual to explain this difference.
I realize making sense of a natural language specification of a date is
complicated. Still, I wonder whether the difference in behavior is intentional
and if so why.
$ for dash_u in '' '-u' ; do for one in 1 a ; do date $dash_u -d "$one day ago"
; done ; done
+ date -d '1 day ago'
Thu Oct 24 09:51:22 EDT 2019
+ date -d 'a day ago'
Thu Oct 24 06:51:22 EDT 2019
+ date -u -d '1 day ago'
Thu Oct 24 13:51:22 UTC 2019
+ date -u -d 'a day ago'
Thu Oct 24 14:51:22 UTC 2019
$ date --version
date (GNU coreutils) 8.26
Copyright (C) 2016 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Written by David MacKenzie.
If you think this is a bug and you'd like a fix, I'd be happy to supply one.
Just let me know. Thanks.
-Matt
- bug#37921: date -d "a day ago" differs from date -d "1 day ago",
Matt Carter <=