Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- 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 UNIX-format time in 'utime' to DOS format
    and fills the 'date' and 'time' structures pointed to by 'dateptr'
    and 'timeptr'.  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 */
          };

    The 'date' structure is defined as follows:

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

    Returns:    There is no return value.

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

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