/* a sample program that return local time. */ #include #include int main() { struct tm *ptr; time_t lt; lt = time(NULL); //return system time printf("time(NULL) = %d\n", lt); ptr = localtime(<); // return time in the form of tm structure printf(asctime(ptr)); }