|
From: | Assaf Gordon |
Subject: | bug#22397: Date -- Format arithemtic yields unexpected results |
Date: | Wed, 24 Oct 2018 15:42:25 -0600 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 |
tags 22397 notabug close 22397 stop (triaging old bugs) On 18/01/16 07:16 AM, Pádraig Brady wrote:
On 18/01/16 03:53, Adam Danischewski wrote:$> date Sun Jan 17 22:49:40 EST 2016 $> date -d"04:00" Sun Jan 17 04:00:00 EST 2016 $> date -d"04:00 +1 day" Sun Jan 17 22:00:00 EST 2016 To fix this, a work around for me now is: $> date -d"$(date -d"04:00") +1 day" Mon Jan 18 04:00:00 EST 2016The +1 is taken as a timezone offset. You'll want: date -d '04:00 today +1 day' Note also the relative date discussion at: http://bugs.gnu.org/18159
date now supports the "--debug" option to make such troubleshooting easier. With no further comments in over a year, I'm closing this bug. -assaf
[Prev in Thread] | Current Thread | [Next in Thread] |