时间戳

作者: 叫我颜先生 | 来源:发表于2023-06-28 17:20 被阅读0次
时间戳
    public static string GetDate(long time)
    {
        System.DateTime startTime = TimeZone.CurrentTimeZone.ToLocalTime(new System.DateTime(1970, 1, 1, 0, 0, 0, 0));
        DateTime dt = startTime.AddMilliseconds(time);
        string t = dt.ToString("yyyy/MM/dd HH:mm");
        return t;
    }

    public static long GetTimeTicks(DateTime time)
    {
        return (time.ToUniversalTime().Ticks - 621355968000000000) / 10000000;
    }

相关文章

  • 时间戳

    很多网站在发布版本之前,都会在请求地址加一个时间戳进行版本更新。这样是版本更新时避免之前用户浏览器的缓存影响。请求...

  • 时间戳

    一. 关于[NSDatedate] 的问题 NSDate*date=[NSDatedate]; NSLog(@"d...

  • 时间戳

    时间戳 ios 在webView中的网页中,时间戳使用时(js)格式要用/ 而不能是-如 应该使用2018/09...

  • 时间戳

    时间戳转换成距此刻多久

  • 时间戳

    // 获取当前时间戳 + (NSString *)getCurrentTime { NSDate *sendd...

  • 时间戳

    // 获取当前时间戳(以s为单位) var timestamp = Date.parse(new Date());...

  • 时间戳

    1970年01月01日00时00分00秒(北京时间1970年01月01日08时00分00秒)>>>UNIX TIM...

  • 时间戳

    新城区的云 出来的时候是七点,现在是五点半的时候天给我嗨。然后

  • 时间戳

    获取当前时间的时间戳 获取指定时间的时间戳

  • 时间戳

    时间戳(timestamp),通常是一个字符序列,唯一地标识某一刻的时间。数字时间戳技术是数字签名技术一种变种的应...

网友评论

      本文标题:时间戳

      本文链接:https://www.haomeiwen.com/subject/jqhqrdtx.html