home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.c
- Path: sparky!uunet!zaphod.mps.ohio-state.edu!cs.utexas.edu!convex!egsner!adaptex!sdf!jjunker
- From: jjunker@sdf.lonestar.org (Jon Junker)
- Subject: Need HELP with strptime....any answers/clues?????
- Message-ID: <BzDJuA.AGF@sdf.lonestar.org>
- Organization: sdf full-shell Public Access Unix - Dallas, TX - 214/436-3281
- Date: Wed, 16 Dec 1992 22:58:57 GMT
- Lines: 42
-
- Hi:
-
- I have been working with some of the time functions (on a Sun
- SPARCstation IPX). After I make a call to strptime (to fill
- in the tm structure) I display the structure (with dbxtool) and
- find that the structure is filled in incorrectly. What am I
- doing wrong?
-
- Please, e-mail me with the answer. Below is some example code.
-
- Thanks for your time,
- Jon
- jjunker@sdf.lonestar.org
-
-
- ---------- Example Call to AsciiToTime ----------
- :
- :
- :
- timeStatus = AsciiToTime("1990,123/065301.123");
- :
- :
- :
-
- ---------- Module and Call in Question ----------
-
- #include <time.h>
-
- AsciiToTime(timeString)
- char *timeString;
- {
- struct tm *my_tm;
-
- /* Convert time string into the time structure (my_tm) */
- (void)strptime(timeString,"%Y,%j/%H%M%S",my_tm);
-
- /* ---> After the above call to strptime the tm structure is not filled
- in correctly. What am I doing wrong ??????
- */
-
- return(0);
- }
-