修改 在线离线的判断逻辑

This commit is contained in:
2026-03-16 13:57:23 +08:00
parent 8ce4017100
commit ddd4f5a6b4
9 changed files with 224 additions and 79 deletions

View File

@@ -772,6 +772,12 @@ namespace Common
long current_timestamp = Convert.ToInt64(ts.TotalSeconds);
return current_timestamp;
}
public static long GetCurrentTimeStamp_MS(DateTime dt)
{
TimeSpan ts = dt - new DateTime(1970, 1, 1, 0, 0, 0, 0, DateTimeKind.Local);
long current_timestamp = Convert.ToInt64(ts.TotalMilliseconds);
return current_timestamp;
}
public static DateTime GetCurrentDateTime(long timestampMilliseconds)
{
DateTime epoch = new DateTime(1970, 1, 1, 0, 0, 0, DateTimeKind.Local);