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++ 3.0r4 - <b>mktime</b> 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);

   ANSI

Description

   Converts from struct tm to time_t.

Example 

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

   int main()
   {
       struct tm ntime;

       time_t set;

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

Return Value

   Time in seconds since 00:00:00 GMT on January 1, 1970 based on struct tm
   returned by localtime.

See Also

   asctime, ctime, localtime, time




See Also: asctime ctime localtime time

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