954,480 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Internet Time Sync

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.

Rass Saee
Newbie Poster
8 posts since Apr 2006
Reputation Points: 10
Solved Threads: 1
 
Narue
Bad Cop
Administrator
15,460 posts since Sep 2004
Reputation Points: 6,464
Solved Threads: 1,401
 

When you've figured out how to talk to the network, read this
http://tools.ietf.org/html/rfc1305

Salem
Posting Sage
Team Colleague
11,531 posts since Dec 2005
Reputation Points: 5,862
Solved Threads: 953
 

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;
}
naavinm
Newbie Poster
2 posts since Sep 2011
Reputation Points: 10
Solved Threads: 0
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You
View similar articles that have also been tagged: