/* a sample program that prints both the local time and the UTC of the system. */ #include #include int main() { struct tm *local_time, *gm; time_t t; t = time(NULL); local_time = localtime(&t); printf("Local time and date: %s\n",asctime(local_time)); gm = gmtime(&t); printf("Coordinated Universal Time and date: %s\n",asctime(gm)); }