Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Borland C++ 2.x ( with Turbo C ) - <b>unixtodos() convert date and time to dos format</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 unixtodos()             Convert Date and Time to DOS Format

 #include <dos.h>

 void         unixtodos(utime,dateptr,timeptr);
 long         utime;                     Time
 struct date  *dateptr;                  Pointer to date structure
 struct time  *timeptr;                  Pointer to time structure

    unixtodos() converts the date and time in 'utime' from UNIX format to
    DOS format, filling in the 'date' and 'time' structures pointed to by
    'dateptr' and 'timeptr'.

    The 'date' structure is defined as follows:

          struct date {
               int da_year;             /* Current year minus 1980 */
               char da_day;             /* Day of the month        */
               char da_mon;             /* Month (1 = Jan)         */
          };

    The 'time' structure is defined as follows:

          struct time  {
               unsigned char ti_min;         /* Minutes */
               unsigned char ti_hour;        /* Hours */
               unsigned char ti_hund;        /* Hundredths of seconds */
               unsigned char ti_sec;         /* Seconds */
          };

       Returns:     Nothing

   Portability:     MS-DOS only.


See Also: ctime() dostounix() getdate() gettime()

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson