天天看點

擷取本地時間,UTC時間

SYSTEMTIME st;

GetLocalTime(&st);

 CTime tLocal(st);

 CString strTime = tLocal.Format("%#c");

 strTime += " Local";

 TRACE("%s/n",strTime);//本地時間

 strTime = tLocal.FormatGmt("%#c");

 strTime += " UTC";

 TRACE("%s/n",strTime);//格林威治時間