This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug libc/4772] strptime() doesn't support strftime()'s flags
- From: "inkerman42 at gmail dot com" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sources dot redhat dot com
- Date: 10 Jul 2007 23:38:19 -0000
- Subject: [Bug libc/4772] strptime() doesn't support strftime()'s flags
- References: <20070710204601.4772.inkerman42@gmail.com>
- Reply-to: sourceware-bugzilla at sourceware dot org
------- Additional Comments From inkerman42 at gmail dot com 2007-07-10 23:38 -------
> The patch is not reasonable. Ignoring the modifiers can give the wrong
> impression and there might be situations where it makes a difference.
Ignoring these modifiers matches existing behaviour. The introduced modifiers
control padding, case, and field width, all of which are already ignored by
strptime().
> There never ever has been a promise that the locale formats are usable in
> strptime.
Such a correspondence has, however, clearly been the intent. SUSv3 explicitly says:
"Several "equivalent to" formats and the special processing of white-space
characters are provided in order to ease the use of identical format strings
for strftime() and strptime()."
Since the standard format specification of strptime() closely matches the
standard format specification of strftime(), it is not, in my opinion,
unreasonable to expect the same from glibc's extensions to the format.
Introducing a functionality that works _usually_, but not always, is a trap for
unwary programmer. It is, of course, easy for gnucash to workaround this
particular limitation, but the real problem is that other programs are likely to
fall victim of it as well.
--
http://sourceware.org/bugzilla/show_bug.cgi?id=4772
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.