How can I check the actual date and time by using an internet connection? I would like to receive the response from the server as a simple string; I don't want to parse an HTML response.
You can find a lot of information on getting date and time from a server here.
Listed on that page are several protocols that are designed to requesting and retrieving date and time:
From there, you can easily find some public servers that support one of these protocols. Then it's just a matter of writing some code to access one of these servers in a way that conforms to the protocol spec.
Or you can use some that's already been written and made freely available, for example:
You may find Building Links to World Time Server.com helpful. They offer several approaches.
Here is a post about getting internet time: C#: Get NIST Internet Time
You should probably look at ntp which is a generic standard for syncing date and time. However windows time already uses that in a domain environment and can be configured to sync against public servers.