This is the mail archive of the glibc-bugs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug libc/4772] strptime() doesn't support strftime()'s flags


------- 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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]