Jump to content
Sign in to follow this  
Akshay07

Synchronize system time to UTC time

Recommended Posts

Akshay07

Hello,

I would like to start a program automatically on two different computers, but it has to be at the same time.

I assume I will need to sync the system time to (for example) UTC time (with respect to the time zones and daylight saving changes) but I did not find anything in the help to do this.

Is there by any chance a "not too complicated way" to do this?

Thanks

Share this post


Link to post
Share on other sites
Akshay07

They do not communicate with each others, and that is on purpose.

Here is what I want to do (as an example). Any comments are more than welcome, I am a beginner and very willing to learn.

Start script        (manually, and at approximatively the same time on both laptops)
 Do some stuff      (this part might not take exactly the same time on both laptops but worse case scenario, the time execution will only differs of a few seconds)
 If time is hh:07:23 then      (I only want to monitor minutes and seconds)
   Start program at hh:08:00   (if the time is sync on both laptops, then the program will start at the same time on both laptops)
 EndIf

There is of course a need of more logic for the calculation of the "start time" but I can see that later.

Share this post


Link to post
Share on other sites
PsaltyDS

If you have WAN connectivity, the time is available from thousands of sites like this one: http://tycho.usno.navy.mil/cgi-bin/timer.pl

You would only have to check once and do a diff calculation between that and local @HOUR/@MIN/@SEC. Then both machines are working off the same time index regardless of localization or how accurately the local clocks are set.

:)


Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.