MrS*_*Scf 5 c# datetime unix-timestamp
我正在尝试将日期转换Saturday, 22. October 1932 00:00:00为unix时间戳-1173747600000。
我的代码在这里:
DateTimeOffset dt2 = new DateTimeOffset(new DateTime(1932, 10, 22)).ToUniversalTime();
long a = dt2.ToUnixTimeMilliseconds();
Run Code Online (Sandbox Code Playgroud)
我正在获取时间戳-1173751200000。我做错了什么?
Epochconverter.com正在按预期计算 unix 时间戳。查看本地时间选项,然后查看时间戳(以毫秒为单位)