ATTENTION: You are viewing a page formatted for mobile devices; to view the full web page, click HERE.

DonationCoder.com Software > Post New Requests Here

Idea : One Shot System Time Sync

(1/3) > >>

MilesAhead:
I find when I WiFi that the WiFi routers block the Windows Time Service.  I thought it may be a nice idea for a small utility that does a one shot time sync when a button is clicked.  It could sit in the tray.  Perhaps with a command line switch so that it syncs the time and exits without showing a Tray Icon.

Right now what I am doing is getting the exact time off the web, then using the time command on the command line.  It would be nicer just to hit a button and have it compensate for AM/PM etc..

This is mainly aimed at my Laptop so I am looking more for a manual trigger than recurrent as I may not be connected to the net when the interval expires.

I found a few ahk scripts on the forum that use the IE activex control to get the time, but they don't quite do the whole job.  Sort of fragments from back around 2006.

The simpler the better.  :)

Edit:  this thread shows how to get the tine using the ie object avoiding the router block.


rjbull:
I'm not sure if it's exactly what you want, but you might try TimeSync, freeware by Horst Schaeffer:

TimeSync gets the current time from a NIST server, and adjusts the PC clock if necessary. Although the exact time is also supplied by Windows or (probably) by your router, you may want to have an extra tool that checks the time at your will.

Time and date are displayed according to the user's regional settings. Accuracy is usually within a second. TimeSync will try alternative servers, in case the time cannot be obtained from the preferred server.

TimeSync Option /auto is provided to run TimeSync from the the Windows task scheduler. In this mode the TimeSync window will not show if the clock offset is under a given minimum.
--- End quote ---

MilesAhead:
I believe I already tried TimeSync and several others similar.  It seems that anything that goes to any of the atomic clocks is blocked by the WiFi routers here at the college.  Even Windows own time service generates an error no matter which time server I select.

I did try a snippet from one of the IE object scripts in AHK.  It did return the time as a string.. but in 12 hour format with no GUI.  It was just there to service some other program by periodically fetching the exact time.  I think the reason it was not blocked was that it just made a call to www.timeanddate.com rather than one of the atomic time serers.

I know I could wrestle with it and come up with something.  But especially in AHK my Guis are  lacking in spiff factor.  :)

skwire:
Just to be sure, did you try Cmdtime from here?:  http://www.softshape.com/download/cmdtime.zip

I've used it for years but, as you said, it might be blocked.  If that doesn't work, I'll see what I can put together.

4wd:

--- Code: Text ---net time \\computername /set
For computername you can try a server on the local network and hopefully get one that hasn't got an exceptionally paranoid firewall.

eg.

--- Code: Text ---C:\>net time \\192.168.0.208 /setCurrent time at \\192.168.0.208 is 25/05/2016 20:42:10 The current local clock is 25/05/2016 20:41:58Do you want to set the local computer's time to match thetime at \\192.168.0.208? (Y/N) [Y]:

Navigation

[0] Message Index

[#] Next page

Go to full version