Himall商城Api签名帮助类
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Security.Cryptography;
namespace Himall.Core.Helper
{
/// <summary>
/// Api簽名幫助類
/// </summary>
public class ApiSignHelper
{
/// <summary>
/// DateTime時間格式轉換為Unix時間戳格式
/// </summary>
/// <param name="time"> DateTime時間格式</param>
/// <returns>Unix時間戳格式</returns>
public static long ConvertDateTimeInt(System.DateTime time)
{
System.DateTime startTime = TimeZone.CurrentTimeZone.ToLocalTime(new System.DateTime(1970, 1, 1, 0, 0, 0, 0));
DateTime dtResult = time;
long t = (dtResult.Ticks - startTime.Ticks) / 10000; //
總結
以上是生活随笔為你收集整理的Himall商城Api签名帮助类的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: C语言求最大公约数和最小公倍数的几种算法
- 下一篇: 曲线连接线_荷重位移曲线仪操作使用注意事