struct tm *tm;
time_t timep;
time(&timep);
tm = localtime(&timep);
int year = tm->tm_year + 1900;
int month = tm->tm_mon + 1;
int day = tm->tm_mday;
int hour=tm->tm_hour;
int minute=tm->tm_min;
int second=tm->tm_sec;
注:测试环境Win8 + VS2012 + cocos2d-x-3.0beta