Mega Code Archive
Categories
/
C++ Tutorial
/
Data Types
Demonstrating the use of the gmtime( ) and asctime( ) functions
#include
#include
int main( ) { struct tm *date_time; time_t timer; time(&timer); date_time=gmtime(&timer); printf("%.19s\n",asctime(date_time)); return (0); }