如何通過C++修改系統(tǒng)時(shí)間?
如何通過C++修改系統(tǒng)時(shí)間?
拉風(fēng)的咖菲貓
2019-05-14 09:08:26
TA貢獻(xiàn)1780條經(jīng)驗(yàn) 獲得超1個(gè)贊
如下運(yùn)用:
獲取系統(tǒng)時(shí)間
SYSTEMTIME curr_st;
GetLocalTime(&curr_st);
修改系統(tǒng)時(shí)間
curr_st.wYear=2006;
curr_st.wMonth=12;
curr_st.wDay=1;
curr_st.wHour=3;
curr_st.wMinute=33;
curr_st.wSecond=59;
curr_st.wMilliseconds=999;
SetLocalTime(&curr_st);
舉報(bào)