GNU bug report logs - #34608
date +%+4C is unimplemented, contrary to POSIX

Previous Next

Package: coreutils;

Reported by: Eric Blake <eblake <at> redhat.com>

Date: Thu, 21 Feb 2019 17:11:02 UTC

Severity: normal

Done: Paul Eggert <eggert <at> cs.ucla.edu>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Paul Eggert <eggert <at> cs.ucla.edu>
Cc: tracker <at> debbugs.gnu.org
Subject: bug#34608: closed (date +%+4C is unimplemented, contrary to POSIX)
Date: Mon, 25 Feb 2019 08:29:02 +0000
[Message part 1 (text/plain, inline)]
Your message dated Mon, 25 Feb 2019 00:27:47 -0800
with message-id <bd7ca372-0f70-5d1e-8207-8d2e4247bc0a <at> cs.ucla.edu>
and subject line Re: bug#34608: date +%+4C is unimplemented, contrary to POSIX
has caused the debbugs.gnu.org bug report #34608,
regarding date +%+4C is unimplemented, contrary to POSIX
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs <at> gnu.org.)


-- 
34608: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=34608
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Eric Blake <eblake <at> redhat.com>
To: bug-coreutils <at> gnu.org
Subject: date +%+4C is unimplemented, contrary to POSIX
Date: Thu, 21 Feb 2019 11:10:06 -0600
POSIX requires the '+' flag in %C to output padding with leading 0, and
additionally to add a +/- indicator if the minimum field width is larger
than 2 bytes.  Thus:

date -d 0001-01-01 +.%+4C.

should produce ".+000.", but currently it produces ".%+4C." because the
+ flag is unimplemented.

See also http://austingroupbugs.net/view.php?id=1184

-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3226
Virtualization:  qemu.org | libvirt.org


[Message part 3 (message/rfc822, inline)]
From: Paul Eggert <eggert <at> cs.ucla.edu>
To: Eric Blake <eblake <at> redhat.com>
Cc: 34608-done <at> debbugs.gnu.org
Subject: Re: bug#34608: date +%+4C is unimplemented, contrary to POSIX
Date: Mon, 25 Feb 2019 00:27:47 -0800
[Message part 4 (text/plain, inline)]
Eric Blake wrote:

> The best I can do is search austingroupbugs.net for all bugs containing
> strftime, which pulls up a current total of 25 issues.

Thanks for doing that. I read through those issues, and the only one that seems 
relevant (i.e., resolved by austingroup but not in Gnulib) is the business with 
the + conversion specification flag. I installed this Gnulib patch to implement 
the flag:

https://git.savannah.gnu.org/cgit/gnulib.git/commit/?id=188d87b05190690d6f8b0577ec65ef221a711d08

Then I installed the attached coreutils patches to propagate the Gnulib patch 
into coreutils, and I am marking this coreutils bug as done.

glibc strftime should also support the + conversion specification flag. I filed 
a bug report for that here:

https://sourceware.org/bugzilla/show_bug.cgi?id=24264
[0001-build-update-gnulib-submodule-to-latest.patch (text/x-patch, attachment)]
[0002-date-conversion-specification-flag.patch (text/x-patch, attachment)]
[0003-doc-fix-typo-in-previous-patch.patch (text/x-patch, attachment)]

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

Previous Next


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