c++ 獲取當前時間周初凌晨時間戳(獲取當前時間週一凌晨時間戳)

龍馬8586發表於2020-10-24

UINT64 GetWeekBeginTime()
{
  time_t t;
  t = time(0);
  tm* t_tm = localtime(&t);
  t_tm->tm_hour = 0;
  t_tm->tm_min = 0;
  t_tm->tm_sec = 0;
  t_tm->tm_wday = 0;
  t = mktime(t_tm);
  return (UINT64)t;
}

相關文章