Guardian C Library Calls Reference Manual

mktime
3-124 128833Guardian TNS C Library Calls Reference Manual
Reference to Library Calls
Example
This example finds the date 1000 days from now.
#include <timeh>
#include <stdioh>
struct tm *timeptr;
time_t now, later;
int main(void)
{
now = time(NULL);
timeptr = localtime(&now);
timeptr -> tm_mday += 1000;
later = mktime(timeptr);
printf("\n1000 days from now: %s\n", ctime(&later));
}