This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: GCC bug with strftime
- From: "Timothy C Prince" <tprince at myrealbox dot com>
- To: rtroy at sciencetools dot com
- Cc: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 10 Jan 2003 01:33:23 +0000
- Subject: Re: GCC bug with strftime
-----Original Message-----
From: Richard Troy <rtroy@sciencetools.com>
To: <gcc-bugs@gcc.gnu.org>
Date: Thu, 9 Jan 2003 15:30:38 -0800 (PST)
Subject: GCC bug with strftime
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
It looks like you are using cygwin, which includes newlib, not glibc, so you might not expect glibc extensions to be supported.
Tim Prince