65,186
社区成员




/* ctime example */
#include <stdio.h>
#include <time.h>
int main ()
{
time_t rawtime;
time ( &rawtime );
printf ( "The current local time is: %s", ctime (&rawtime) );
return 0;
}
SYSTEMTIME CurrentTime;
memset(¤t, 0, sizeof(current));
GetLocalTime(¤tTime);
current.tm_isdst = 0;
current.tm_year = CurrentTime.wYear - STARTDATE;
current.tm_mon = CurrentTime.wMonth - 1;
current.tm_mday = CurrentTime.wDay;
current.tm_hour = CurrentTime.wHour;
current.tm_min = CurrentTime.wMinute;
current.tm_sec = CurrentTime.wSecond;