Date: Mon, 2 Aug 1999 02:38:27 +0200 (MET DST) From: Gisle Vanem To: djgpp AT delorie DOT com Subject: Re: strftime BROKEN??? In-Reply-To: <37a4ba2d.323433@news.erie.net> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Reply-To: djgpp AT delorie DOT com X-Mailing-List: djgpp AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk On Sun, 1 Aug 1999, Radical NetSurfer wrote: ^^ Why can't you state your real name instead of some silly alias? > When I try to compile this sample code (from the Libc.hlp file), it > compiles with no problems, HOWEVER, it does not work!!! > > what's wrong ?!? > how is it FIXED ?!? > > #include > #include > > /* size_t strftime(char *buf, size_t n, const char *format, const > struct tm *time); */ > > struct tm t; > > char buf[100]; > > strftime(buf, 100, "%B %d, %Y", &t); > > printf("Date/Time: %s\n", buf); > ---------------------------------------------------------------------------------------------------- > compiles: AOK > outputs: January 00, 1900 > why this funky incorrect output?!? What would you expect? You have to initialise 't' to some time+date (using mktime for example). > PLEASE: What other faulty things (ie SURPRISES) am I in > store for with DJGPP ?!? Learn C programming first, then you can complain about bugs you think you've found. Gisle V.