Example #1
0
 /// <summary>
 /// 获得服务器时间
 /// </summary>
 /// <returns></returns>
 public DateTime GetServerTime()
 {
     PS_TIME ps_tm = new PS_TIME();
     Int32 ret = psAPI_Server_GetTime(dbConnector.Handle, ref ps_tm);
     if (0 == ret) {
         return DateTime.Parse("1970-01-01 00:00:00").AddSeconds(ps_tm.Second).AddMilliseconds(ps_tm.Millisec);
     }
     else {
         return DateTime.Parse("1970-01-01 00:00:00");
     }
 }
Example #2
0
 public static extern int psAPI_Server_GetTime(UInt16 handle, ref PS_TIME ps_tm);