Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Zortech C++ Language Reference - mktime http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
   mktime

   Usage
   #include <time.h>
   time_t mktime(struct tm *ntime);

   Description
   Converts from struct tm to time_t.

   Example
   #include <time.h>
   #include <stdio.h>

   main()
   {
   struct tm ntime;
   time_t set;

        time(&set);
        ntime = *localtime(&set);
        printf("Seconds since 1 Jan 1970 is %ld",mktime(&ntime));
        printf("The time is %s",asctime(&ntime));
   }

   Return Value
   Time in seconds since 00:00:00 1 Jan 1970 based on struct tm  returned
   by localtime.


See Also: asctime ctime localtime time

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