有没有在C#中的方法,该方法返回UTC(GMT)时区?不是基于系统的时
Is there a method in C# that returns the UTC (GMT) time zone? Not based on the system's time.
基本上我想要得到正确的UTC时间,即使我的系统时间是不正确的。
Basically I want to get the correct UTC time even if my system time is not right.
而不是调用的
DateTime.Now.ToUniversalTime()
您可以致电
DateTime.UtcNow
同样的事情,但更短的:)文档。
Same thing but shorter :) Documentation here.
上一篇:内置的辅助解析User.Identity.Name到域\用户名用户名、User、Identity、Name
下一篇:安装Windows服务的SC.exe或InstallUtil.exe - 有差异,但哪个?差异、SC、Windows、InstallUtil