Loading

C# DateTime.Now和DateTime.UtcNow的区别

  • DateTime.Now
    Gets a System.DateTime object that is set to the current date and time on this computer, expressed as the local time.
    获取本地时间。

  • DateTime.UtcNow
    Gets a System.DateTime object that is set to the current date and time on this computer, expressed as the Coordinated Universal Time (UTC).
    获取标准时区的当前时间。

posted @ 2022-09-29 14:06  六弦汤姆  阅读(292)  评论(0编辑  收藏  举报