public static DateTime GetSystemTime() { SYSTEMTIME stime = new SYSTEMTIME(); GetSystemTime(ref stime); return(stime.ToDateTime().ToLocalTime()); }
internal ConnectionDetail(CONNMGR_CONNECTION_DETAILED_STATUS item) { this.Version = item.dwVer; this.AdapterName = item.szAdapterName; this.ConnectionOption = item.dwFlags; this.ConnectionStatus = item.dwConnectionStatus; this.ConnectionSubType = GetConnSubtype(item); this.ConnectionType = item.dwType; this.Description = item.szDescription; this.DestinatonNetwork = item.guidDestNet; this.DetailStatusParam = item.dwParams; this.IPAddress = item.pIPAddr; SYSTEMTIME st = new SYSTEMTIME(); st.wYear = item.LastConnectTime[0]; st.wMonth = item.LastConnectTime[1]; st.wDay = item.LastConnectTime[3]; st.wHour = item.LastConnectTime[4]; st.wMinute = item.LastConnectTime[5]; st.wSecond = item.LastConnectTime[6]; this.LastConnectionTime = st.ToDateTime(); }
public static DateTime ToDateTime(SYSTEMTIME time) { return(time.ToDateTime()); }
public static DateTime ToDateTime(SYSTEMTIME time) { return time.ToDateTime(); }