home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / comp / lang / c / 18748 < prev    next >
Encoding:
Internet Message Format  |  1992-12-21  |  1.2 KB

  1. Path: sparky!uunet!noc.near.net!hri.com!spool.mu.edu!agate!linus!linus.mitre.org!mbunix.mitre.org!jrv
  2. From: jrv@mbunix.mitre.org (Van Zandt)
  3. Newsgroups: comp.lang.c
  4. Subject: Re: Need HELP with strptime....any answers/clues?????
  5. Message-ID: <1992Dec21.172542.28171@linus.mitre.org>
  6. Date: 21 Dec 92 17:25:42 GMT
  7. References: <BzDJuA.AGF@sdf.lonestar.org> <BzH0Bs.K4J@news.cecer.army.mil>
  8. Sender: news@linus.mitre.org (News Service)
  9. Organization: The MITRE Corp., Bedford, Ma.
  10. Lines: 23
  11. Nntp-Posting-Host: mbunix.mitre.org
  12.  
  13. In article <BzH0Bs.K4J@news.cecer.army.mil> pirzyk@vinny.cecer.army.mil (Jim Pirzyk) writes:
  14. >In <BzDJuA.AGF@sdf.lonestar.org> jjunker@sdf.lonestar.org (Jon Junker) writes:
  15. >
  16. >>Hi:
  17. >> 
  18. >>I have been working with some of the time functions (on a Sun
  19. >>SPARCstation IPX).  After I make a call to strptime (to fill 
  20. >>in the tm structure) I display the structure (with dbxtool) and
  21. >>find that the structure is filled in incorrectly.  What am I 
  22. >>doing wrong?
  23. ...
  24. >> 
  25. >>AsciiToTime(timeString)
  26. >>char    *timeString;
  27. >>{
  28. >>    struct    tm    *my_tm;
  29. >> 
  30. >>    (void)strptime(timeString,"%Y,%j/%H%M%S",my_tm);
  31.  
  32. my_tm needs to be initialized to point to a struct tm before
  33. asking strptime to fill it in.
  34.  
  35.                    - Jim Van Zandt <jrv@mitre.org>
  36.