16 lines
318 B
C
16 lines
318 B
C
|
#define __STDC_WANT_LIB_EXT1__ 1
|
||
|
#include <stdio.h>
|
||
|
#include <time.h>
|
||
|
|
||
|
void main()
|
||
|
{
|
||
|
struct tm time_of_day;
|
||
|
time_t ltime;
|
||
|
auto char buf[26];
|
||
|
|
||
|
time( <ime );
|
||
|
_localtime( <ime, &time_of_day );
|
||
|
asctime_s( buf, sizeof( buf ), &time_of_day );
|
||
|
printf( "Date and time is: %s\n", buf );
|
||
|
}
|