I want to get DateTime from an external reliable source. I know I can get it via DateTime.Now() Method, but that can be fooled easily by changing the Systems Date and Time. Is there a way around? It is a windows form app!
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You need a Network Time Server Client class.
In short, you ask one of the numerous Time Server on Internet the date and time to set your internal PC clock using the NTP protocol.
If you search for NTP Client you will find numerous examples.
This is the first that came out from a Bing Search
Quoting:
Of course, as everything installed on a client PC, also this could be hacked faking the address of the time server and returning a different value. But this will require more work from the hacker than simply resetting the PC clock.