| | |
| | | /// 随机密码6位 |
| | | /// </summary> |
| | | /// <returns></returns>
public static string getCode()
{
Random rand = new Random();
string code = "";
for (int ctr = 0; ctr < 6; ctr++)
{
code += rand.Next(10).ToString();
}
return code;
} |
| | | /// <summary>
/// 获取当前时间戳
/// </summary>
/// <returns></returns>
public static string GetCurrentTimeStamp()
{
TimeSpan ts = DateTime.Now - new DateTime(1970, 1, 1, 0, 0, 0, 0);
return Convert.ToInt64(ts.TotalSeconds).ToString();
} |
| | | /// <summary>
/// 获取当前时间戳
/// </summary>
/// <returns></returns>
public static string GetTomorrowTimeStamp()
{
//当前时间的后一天
TimeSpan ts = DateTime.Now.AddDays(1) - new DateTime(1970, 1, 1, 0, 0, 0, 0);
return Convert.ToInt64(ts.TotalSeconds).ToString();
} |
| | | /// <summary>
/// 获取当前时间戳
/// </summary>
/// <returns></returns>
public static string GetCurrentTimeStamp()
{
//TimeSpan ts = DateTime.Now - new DateTime(1970, 1, 1, 0, 0, 0, 0);
//return Convert.ToInt64(ts.TotalSeconds).ToString();
System.DateTime startTime = TimeZone.CurrentTimeZone.ToLocalTime(new System.DateTime(1970, 1, 1)); // 当地时区 |
| | | |
| | | return ((long)(DateTime.Now - startTime).TotalSeconds).ToString(); // 相差秒数 |
| | |
} |
| | | /// <summary>
/// 获取当前时间戳
/// </summary>
/// <returns></returns>
public static string GetTomorrowTimeStamp()
{
//当前时间的后一天
//TimeSpan ts = DateTime.Now.AddDays(1) - new DateTime(1970, 1, 1, 0, 0, 0, 0);
//return Convert.ToInt64(ts.TotalSeconds).ToString(); |
| | | System.DateTime startTime = TimeZone.CurrentTimeZone.ToLocalTime(new System.DateTime(1970, 1, 1)); // 当地时区 |
| | | return ((long)(DateTime.Now.AddDays(1) - startTime).TotalSeconds).ToString(); // 相差秒数 |
| | | } |
| | | [Serializable] |
| | | public class VideoClouds |
| | | { |
| | | { |
| | | /// <summary> |
| | | /// 丰林绑定id(flBindId) |
| | | /// 丰林绑定id(flBindId)(userKey) |
| | | /// </summary> |
| | | public string id = string.Empty; |
| | | /// <summary> |