This is the mail archive of the
libc-help@sourceware.org
mailing list for the glibc project.
Re: strptime vs C locale vs other locale - test case attached
- From: "Carlos O'Donell" <carlos at systemhalted dot org>
- To: "Arkadiusz Miskiewicz" <arekm at maven dot pl>
- Cc: libc-help at sourceware dot org
- Date: Tue, 8 Jul 2008 11:40:34 -0400
- Subject: Re: strptime vs C locale vs other locale - test case attached
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:sender :to:subject:cc:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references :x-google-sender-auth; bh=FY/oOvsZHUbquFX1diRfTfGLtytI0FtZcBN2YB2Lxdo=; b=hHCEhLUiPgNLzZxK0lJZ/hzfUtimSFTSM0QoG7vC7QfORk8hnVRxFHIk3Xvnu85EO/ eJWAj2Bk7BzJ2+8cjH4ika5NnAqIXSnJmHwh0XyYAYK3JgJKhDb5BAqQwulj/JAocnVc bX7BxaII8FJh2VpOsPbQHCvTFGYeZHlLOlyp4=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:sender:to:subject:cc:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references:x-google-sender-auth; b=eY9maYZ9kAww9oadki7lhq/efR8ZdNHBu8M0fJ2E/gfZGGzTM4kPfwuLQTjYVOooNP XLvJm5vNO5p+Kew08aJ1mFmGX6ewMHbQP+J86uoUe8bbd+xFgnYsU6CHqW6bzurVJGFK fQttjhQo4flUd3ntwEfU4CXPwy9hjh7mzHqRs=
- References: <200807010709.38181.arekm@maven.pl> <119aab440807060943q751a6dcel995e1449dbf0d36a@mail.gmail.com> <200807072344.51034.arekm@maven.pl>
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.