GNU bug report logs - #22397
Date -- Format arithemtic yields unexpected results

Previous Next

Package: coreutils;

Reported by: Adam Danischewski <adam.danischewski <at> gmail.com>

Date: Mon, 18 Jan 2016 06:36:02 UTC

Severity: normal

Tags: notabug

Done: Assaf Gordon <assafgordon <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


Message #14 received at 22397 <at> debbugs.gnu.org (full text, mbox):

From: Assaf Gordon <assafgordon <at> gmail.com>
To: 22397 <at> debbugs.gnu.org
Subject: Re: bug#22397: Date -- Format arithemtic yields unexpected results
Date: Wed, 24 Oct 2018 15:42:25 -0600
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 2016
> 
> The +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





This bug report was last modified 6 years and 271 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.