DOSUNIX.C
Upload User: qq5388545
Upload Date: 2022-07-04
Package Size: 29849k
Code Size: 0k
Category:

GUI Develop

Development Platform:

C/C++

  1. #include <stdio.h>
  2. #include <dos.h>
  3. #include <time.h>
  4. void main (void)
  5.  {
  6.    struct time dostime;
  7.    struct date dosdate;
  8.    time_t unix_format;
  9.    struct tm *local;
  10.    getdate(&dosdate);
  11.    gettime(&dostime);
  12.    unix_format = dostounix(&dosdate, &dostime);
  13.    local = localtime(&unix_format);
  14.    printf("UNIX time: %sn", asctime(local));
  15.  }