This is the mail archive of the libc-help@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]

Re: strptime vs C locale vs other locale - test case attached


On Mon, Jul 7, 2008 at 5:44 PM, Arkadiusz Miskiewicz <arekm@maven.pl> wrote:
> Now in "Questions about strptime()/strftime()" thread where I posted a little
> modified test case you wrote that
>
> "This returns "Illegal seek" because "%F", "%z", and "%Z" are not valid
> formats which strptime can convert." but I was using "%z and 4 times and
> strptime failed only once.

Thanks for reminding me, I wasn't looking too closely at your
conversion specifiers.

The standard doesn't say what should happen if you use an invalid
conversion specifiers. I would assume that returning a null e.g.
conversion failed, would be the required action.

So the bug is: "glibc's strptime does not return null when passed an
invalid conversion specifier."

I have yet to see any documentation that says "Support for %z in
strptime is a gnu extension."

Cheers,
Carlos.


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