1退货包裹保存到服务端
This commit is contained in:
1 parent
c3dc9979d1
commit
77ec460f4d
12 files changed
+296
-460
No files matched your search
@@ -19,5 +19,27 @@ namespace KJD_Web.Utils
|
||||
TimeSpan toNow = new TimeSpan(lTime);
|
||||
return dateTimeStart.Add(toNow);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// C#格式时间转换为Unix时间戳(秒)
|
||||
/// </summary>
|
||||
/// <param name="time"></param>
|
||||
/// <returns></returns>
|
||||
public static int DateTimeToTimestampSeconds(DateTime time)
|
||||
{
|
||||
System.DateTime startTime = TimeZone.CurrentTimeZone.ToLocalTime(new System.DateTime(1970, 1, 1));
|
||||
return (int)(time - startTime).TotalSeconds;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// C#格式时间转换为Unix时间戳(毫秒)
|
||||
/// </summary>
|
||||
/// <param name="time"></param>
|
||||
/// <returns></returns>
|
||||
public static long DateTimeToTimestampMilliseconds(DateTime time)
|
||||
{
|
||||
System.DateTime startTime = TimeZone.CurrentTimeZone.ToLocalTime(new System.DateTime(1970, 1, 1));
|
||||
return (long)(time - startTime).TotalMilliseconds;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user