FILETIME转换SYSTEMTIME问题。
FILETIME转换SYSTEMTIME问题。
精简代码如下。
SYSTEMTIME st,st2;
FILETIME ft,ft2;
st.wYear=2010;
st.wMonth=5;
st.wDay=6;
st.wHour=10;
st.wMinute=2;
st.wSecond=30;
//转换成FILETIME
SystemTimeToFileTime(&st2,&ft);
//转换成SYSTEMTIME
FileTimeToLocalFileTime(&ft,&ft2);
FileTimeToSystemTime(&ft2,&st2);
我这样转换成FILETIME再转换回SYSTEMTIME,st和st2结构里的值不一样,哪里转换错了?