示例#1
0
        /// <summary>
        /// 将时间日期对象转换为JavaScript整型时间类型
        /// </summary>
        /// <param name="dateSource">时间类型对象</param>
        /// <returns></returns>
        public static long ToUnixTimeMilliseconds(this DateTime dateSource)
        {
            DateTimeOffset dateTimeOffset = new DateTimeOffset(dateSource);

            return(dateTimeOffset.ToUnixTimeMilliseconds());
        }