delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2003/01/13/20:45:28

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
X-Authentication-Warning: denzel.in: rtroy owned process doing -bs
Date: Mon, 13 Jan 2003 17:46:20 -0800 (PST)
From: Richard Troy <rtroy AT sciencetools DOT com>
X-X-Sender: <rtroy AT denzel DOT in>
To: <cygwin AT cygwin DOT com>
Subject: GCC bug with strftime
Message-ID: <Pine.LNX.4.33.0301131738510.32485-100000@denzel.in>
MIME-Version: 1.0

Hi All,

It's been about eight months since I last posted to this list - hope
everyone is doing well...

I recently discovered a bug in strftime(). I downloaded a very recent copy
of cygwin and tried again, but it's still there. So, I'd like to report
it. I sent mail to the gcc-bugs list but nobody there seems to care, so I
thought I'd mention it here.

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
$

My workaround (in the bug script) gets the hour as two digits and then
tosses a leading zero... What a pain. -shrug-

I don't know how to check what version of the library I have, but I have
the following gcc compilers installed (as reported by cygcheck -s):

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!

Thanks much,
Richard

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



--
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/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019