我的Time

C++改本地时间

#include<iostream>
#include<windows.h>
using namespace std;

void main()
{
	 //time_t t = time(0); 
	SYSTEMTIME curr_st;
	GetLocalTime(&curr_st);

	curr_st.wYear = 2016;
	curr_st.wMonth = 5;
	curr_st.wDay = 19;
	curr_st.wHour = 10;
	curr_st.wMinute = 33;
	curr_st.wSecond = 59;
	curr_st.wMilliseconds = 999;
	SetLocalTime(&curr_st);


}

  

原文地址:https://www.cnblogs.com/feifeishi/p/5507878.html