Getting current GMT time

前端 未结 6 2112
鱼传尺愫
鱼传尺愫 2020-12-28 11:46

Is there a method in C# that returns the UTC (GMT) time zone? Not based on the system\'s time.

Basically I want to get the correct UTC time even if my system time is

6条回答
  •  遥遥无期
    2020-12-28 12:32

    If I were to wager a guess for how to get a guaranteed accurate time, you'd have to find / write some NNTP class to get the time off of a time server.

    If you search C# NTP on google you can find a few implementations, otherwise check the NTP protocol.

提交回复
热议问题