c++ 获取年初时间戳

int GetYearBeginTime(UINT iTmpStamp, UINT& iStamp)
{
  time_t tick = static_cast<time_t>(iTmpStamp);
  struct tm * standard = localtime(&tick);
  standard->tm_mon = 0;
  standard->tm_mday = 1;
  standard->tm_hour = 0;
  standard->tm_min = 0;
  standard->tm_sec = 0;
  iStamp = static_cast<UINT>(mktime(standard));
  return TRUE;
}

上一篇:转载:mybatis批量更新数据三种方法


下一篇:ES--Kibana相关操作创建索引和Mapping