c++ 获取月初时间戳
#include<windows.h>
#include <time.h>
int GetMonthBegin(UINT iTmpStamp, UINT& iStamp)
{
time_t tick = static_cast<time_t>(iTmpStamp);
struct tm t_tm;
localtime_s(&t_tm, &tick);
t_tm.tm_mday = 1;
t_tm.tm_hour = 0;
t_tm.tm_min = 0;
t_tm.tm_sec = 0;
iStamp = static_cast<UINT>(mktime(&t_tm));
return TRUE;
}