I need to get the current time from Internet using C language. Any help is appreciated, hopefully a source code sample. Thank you in advance.

Recommended Answers

All 3 Replies

If you're running Windows XP and syncing to time.windows.com, try this:

#include <stdio.h>
#include <stdlib.h>

int main()
{
	system("w32tm /resync");
	system("pause");
        
        return 0;
}
Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.19 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.