This commit is contained in:
2021-07-06 15:16:17 +08:00
parent 957d206c2b
commit 7f785d6423
13 changed files with 240 additions and 102 deletions
+14
View File
@@ -758,6 +758,20 @@ namespace BLL
return quarterly;
}
public static DateTime ConvertToDateTime(Int32 d)
{
DateTime startTime = new DateTime(1970, 1, 1, 0, 0, 0);
startTime = startTime.AddSeconds(d).ToLocalTime();
return startTime;
}
public static Int32 ConvertDateTimeToInt32(DateTime dtime)
{
string dt = string.Format("{0:yyyy-MM-dd HH:mm:ss}", dtime);
DateTime dt1 = new DateTime(1970, 1, 1, 8, 0, 0);
DateTime dt2 = Convert.ToDateTime(dt);
return Convert.ToInt32((dt2 - dt1).TotalSeconds);
}
#endregion
/// <summary>