[Windows]获取当前时间(年/月/日/时/分/秒)

struct tm* GetCurTime(time_t inTime)
{
    struct tm* curTime = localtime(&inTime);
    curTime->tm_year += 1900;
    curTime->tm_mon += 1;
    return curTime;
}

 

posted @ 2017-03-01 10:23  byjz  阅读(1389)  评论(0编辑  收藏  举报