GNU bug report logs - #11115
linux date arithmetic

Previous Next

Package: coreutils;

Reported by: Stefan Karamuz <stefan <at> karamuz.pl>

Date: Wed, 28 Mar 2012 17:59: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 #17 received at 11115 <at> debbugs.gnu.org (full text, mbox):

From: Eric Blake <eblake <at> redhat.com>
To: Bruno Haible <bruno <at> clisp.org>
Cc: bug-gnulib <at> gnu.org, 11115 <at> debbugs.gnu.org,
	Stefan Karamuz <stefan <at> karamuz.pl>
Subject: Re: bug#11115: linux date arithmetic
Date: Wed, 28 Mar 2012 15:59:28 -0600
[Message part 1 (text/plain, inline)]
On 03/28/2012 03:23 PM, Bruno Haible wrote:
> Eric Blake wrote:
>> the parser is faced with an ambiguity between:
>>
>> (11:38 +1) minute
>> 11:38 (+1 minute)
> 
> What is the first interpretation meant to mean?

The time 11:38 in the timezone UTC+1, plus the unit represented by 'minute'.

> "10:38 minute" or "12:38 minute" is not a time designation I have ever heard
> in spoken nor written English.

True, 'minute' in isolation, without a 'plus one' qualifier, is unusual;
but we have to continue to parse it in isolation since scripts may now
be relying on it.

> 
> If you ditch this interpretation, there is no ambiguity.

Yes, we're in violent agreement here: the added context of a +1 (and in
particular, of a '+ 1' with a space after the +), should indeed favor
the spoken preference of a time with no timezone, followed by a
completed relative designation; rather than of a relative designation
with only an implied quantity.  It's just that getdate.y is a hairy mess
to properly implement that change without breaking other worthwhile
constructs, so I won't be the one volunteering.

-- 
Eric Blake   eblake <at> redhat.com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

[signature.asc (application/pgp-signature, attachment)]

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

Previous Next


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