唐山轨道机控制端TCP服务
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

21 lines
650 B

8 months ago
using System;
namespace EGFramework{
public static class EGDateTimeExtension
{
public static string GetFullDateMsg(this IEGFramework self)
{
return DateTime.Now.ToString("yyyy-MM-dd") + " " + DateTime.Now.ToString("HH:mm:ss");
}
public static string GetDayDateMsg(this IEGFramework self)
{
return DateTime.Now.ToString("HH:mm:ss");
}
public static long GetTimeStamp(this IEGFramework self)
{
TimeSpan ts = DateTime.Now - new DateTime(1970, 1, 1, 8, 0, 0, 0);
return System.Convert.ToInt64(ts.TotalSeconds);
}
}
}