GCC bug with strftime

Corinna Vinschen corinna-cygwin@cygwin.com
Tue Jan 14 10:01:00 GMT 2003


On Mon, Jan 13, 2003 at 07:00:07PM -0800, Richard Troy wrote:
> > > The problem is that this call fails to return an hour:
> > >
> > > strftime(IT,key,"%m/%d/%y %l:%M %p", brokentime);

I'm sorry to say that but...

> The answer is yes, I have checked. The code works in my various RedHat
> environments and has been for a long time. Also capital I is not what I

...just because it works under RH Linux it doesn't mean it's correct code.
The %l specifier character is not covered by SUSv3:

http://www.opengroup.org/onlinepubs/007904975/functions/strftime.html

which means, your usage of %l is non-portable.

Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Developer                                mailto:cygwin@cygwin.com
Red Hat, Inc.

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/



More information about the Cygwin mailing list