16,471
社区成员
发帖
与我相关
我的任务
分享
#include <time.h>
#include <stdio.h>
int main( void )
{
struct tm *newTime;
time_t szClock = 1319601010;
// Convert time to struct tm form
newTime = localtime( &szClock );
// Print local time as a string.
printf( "Current date and time: %s", asctime( newTime ) ); // C4996
// Note: asctime is deprecated; consider using asctime_s instead
return 0;
}