{
struct tm *newtime;
char tmpbuf[128];
time_t lt1;
time( <1 );//获得当前时间
newtime=localtime(<1);//转换成当地时间
strftime( tmpbuf, 128, "Today is %A, day %d of %B in the year %Y.\n", newtime);
printf(tmpbuf);
return 0;
}
#include
#include
#include
int main( void )
{
struct tm *newtime;
char tmpbuf[128];
time_t lt1;
time( <1 );//获得当前时间
newtime=localtime(<1);//转换成当地时间
strftime( tmpbuf, 128, "Today is %A, day %d of %B in the year %Y.\n", newtime);
printf(tmpbuf);
return 0;
}