DateTime.Now
和 DateTime.UtcNow
有什么区别。
有什么性能差异吗?
更新:我读了这篇文章 (http://www.nayyeri.net/the-darkness-behind-datetime-now),我认为我们有很大的不同,你不觉得吗?我想应该还有别的东西。
最佳答案
Gets a DateTime object that is set to the current date and time on this computer, expressed as the local time.
Gets a DateTime object that is set to the current date and time on this computer, expressed as the Coordinated Universal Time (UTC).
至于性能 DateTime.Now 由于时区调整,速度稍慢。
您可以在 THIS 中找到更多详细信息线程。
关于c# - DateTime 函数之间有什么区别?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6119430/