delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2003/01/14/04:07:05

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
Date: Tue, 14 Jan 2003 10:05:46 +0100
From: Corinna Vinschen <corinna-cygwin AT cygwin DOT com>
To: Cygwin <cygwin AT cygwin DOT com>
Subject: Re: GCC bug with strftime
Message-ID: <20030114090546.GB1373@cygbert.vinschen.de>
Reply-To: cygwin AT cygwin DOT com
Mail-Followup-To: Cygwin <cygwin AT cygwin DOT com>
References: <031501c2bb75$72f016a0$f836ba8c AT sfdev3> <Pine DOT LNX DOT 4 DOT 33 DOT 0301131856000 DOT 32485-100000 AT denzel DOT in>
Mime-Version: 1.0
In-Reply-To: <Pine.LNX.4.33.0301131856000.32485-100000@denzel.in>
User-Agent: Mutt/1.4i

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 AT cygwin DOT 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/

- Raw text -


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