09-boost-time

time_t now=time(0); 当前时间戳

tm *ltm = localtime(&now);

cout<<"year:" << ltm->tm_year+1900 << endl; 当前年份

cout << "tm_mon:" << ltm->tm_mon+1 << endl; 当前月份

cout << "tm_hour:" << ltm->tm_hour << endl; 当前小时