cvs.gedasymbols.org/archives/browse.cgi   search  
Mail Archives: djgpp/1999/08/01/19:32:36

From: NoSpam AT Ever DOT Com (Radical NetSurfer)
Newsgroups: comp.os.msdos.djgpp
Subject: strftime BROKEN???
Message-ID: <37a4ba2d.323433@news.erie.net>
X-Newsreader: Forte Agent 1.5/32.452
MIME-Version: 1.0
Lines: 32
NNTP-Posting-Host: 208.1.140.59
X-Trace: typ12.nn.bcandid.com 933542724 208.1.140.59 (Sun, 01 Aug 1999 17:25:24 EDT)
NNTP-Posting-Date: Sun, 01 Aug 1999 17:25:24 EDT
Date: Sun, 01 Aug 1999 21:25:09 GMT
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

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 <stdio.h>
#include <time.h>

/* 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?!?


PLEASE: What other faulty things (ie SURPRISES) am I in
                store for with DJGPP ?!?

THANKS for the help.

http://members.tripod.com/~RadSurfer/

- Raw text -


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