WinCE UTC时间转为本地时间的方法

SYSTEMTIME stime;
stime.wYear = WORD(m_GpsInfo.GPRMCInfo.UTCDate%100+2000);
stime.wMonth = WORD(m_GpsInfo.GPRMCInfo.UTCDate/100%100);
stime.wDay = WORD(m_GpsInfo.GPRMCInfo.UTCDate/10000);
stime.wHour = WORD(m_GpsInfo.GPRMCInfo.UTC/10000);
stime.wMinute = WORD(m_GpsInfo.GPRMCInfo.UTC/100%100);
stime.wSecond = WORD(m_GpsInfo.GPRMCInfo.UTC%100);

FILETIME ftime;
SystemTimeToFileTime(&stime,&ftime);

FILETIME flocaltime;
FileTimeToLocalFileTime(&ftime,&flocaltime);
FileTimeToSystemTime(&flocaltime,&stime);

 

上一篇:JavaScript--学习笔记9(引 用 类 型)


下一篇:C#日期与时间