我的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);


}

  

posted @ 2016-05-19 10:44  非非是  阅读(205)  评论(0编辑  收藏  举报