DateTimeOffset.ToUnixTimeMilliseconds 方法
定义
返回自 1970-01-01T00:00:00.000Z 起已经过的毫秒数。Returns the number of milliseconds that have elapsed since 1970-01-01T00:00:00.000Z.
public:
long ToUnixTimeMilliseconds();
public long ToUnixTimeMilliseconds ();
member this.ToUnixTimeMilliseconds : unit -> int64
Public Function ToUnixTimeMilliseconds () As Long
返回
自 1970-01-01T00:00:00.000Z 起已经过的毫秒数。The number of milliseconds that have elapsed since 1970-01-01T00:00:00.000Z.
注解
Unix time 表示自1970年1月1日01T00:00: 00Z (1970:00:00:00:00:,上午 12:00 AM UTC) 的秒数。Unix time represents the number of seconds that have elapsed since 1970-01-01T00:00:00Z (January 1, 1970, at 12:00 AM UTC). 它不会考虑闰秒的时间。It does not take leap seconds into account. 此方法返回 Unix 时间中的毫秒数。This method returns the number of milliseconds in Unix time.
此方法首先将当前实例转换为 UTC,然后再返回其 Unix 时间中的毫秒数。This method first converts the current instance to UTC before returning the number of milliseconds in its Unix time. 对于 1970-01-01T00:00:00Z 之前的日期和时间值,此方法返回一个负值。For date and time values before 1970-01-01T00:00:00Z, this method returns a negative value.