[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#16782: Insensitive behavior in date when given invalid fomatting str
From: |
Assaf Gordon |
Subject: |
bug#16782: Insensitive behavior in date when given invalid fomatting string |
Date: |
Sun, 21 Oct 2018 15:31:37 -0600 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 |
severity 16782 wishlist
retitle 16782 date: reject invalid %[X] format characters
stop
(triaging old bugs)
Hello,
On 17/02/14 10:42 AM, address@hidden wrote:
Consider the following set of date invocations:
$ date +%05
00%05
$ date +%Y%#05
20140%#05
$ date +x%7
x %7
$ date "+%7 xyz"
%7 xyz
$ date "+%7q xyz"
%7q xyz
GNU date behaves strangely when given an invalid formatting string. GNU date
does not inform the user about the invalid formatting string; instead it outputs
padding as if the flags and field-width
It seems your message was never replied to. Sorry about that.
Indeed, this would be a nice improvement, contrast:
$ printf "+%7 xyz"
-bash: printf: ` ': invalid format character
$ /src/printf "+%7 xyz"
+./src/printf: %7 : invalid conversion specification
$ ./src/printf "+%7q xyz"
+./src/printf: %7q: invalid conversion specification
Marking this as a "wishlist" item.
-assaf
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- bug#16782: Insensitive behavior in date when given invalid fomatting string,
Assaf Gordon <=