GCC bug with strftime

Richard Troy rtroy@sciencetools.com
Mon Jan 13 05:17:00 GMT 2003


Hi,

Today I found a bug with the results from strftime, and I'd like to report
it. I downloaded the software recently, so _maybe_ it's a current problem?
I was sure surprised!

The problem is that this call fails to return an hour:

	strftime(IT,key,"%m/%d/%y %l:%M %p", brokentime);

The l% is supposed to represent a _space_ padded hour, as documented here:
http://www.gnu.org/manual/glibc-2.0.6/html_chapter/libc_17.html#SEC302

I wrote a test program to illustrate the problem - call it a "bug script:"

$ ./strftime

This program illustrates a bug with strftime as it fails to return the hour.
We are trying to use these flags: '%m/%d/%y %l:%M %p'
strftime returned: 01/09/03 :26 PM
The proper result: 01/09/03 3:26 PM
$

I don't know how to check what version of the library I have, but I have
the following gcc compilers installed:

gcc                 3.2-3
gcc-mingw           20020817-4
gcc2                2.95.3-10

Please direct me on how I can get this information to someone who knows
what to do with it!

Please also note that I'm _not_ subscribed to _any_ email lists related to
GNU!

Thanks much,
Richard

-- 
Richard Troy, Chief Scientist
Science Tools Corporation
rtroy@ScienceTools.com, 510-567-9957, http://ScienceTools.com/



More information about the Gcc-bugs mailing list