09-07-2009 12:22 AM
Hi all,
Windows has the ability to obtain and set the time on my PC.
I'm wondering if I can use this (service?) in my apps to check the internet time.
I have read something about the w32time.dll and the NetApi32.dll, am I on the right track?
Does anyone know how to or has anyone done this?
Cheers,
Battler.
09-07-2009 12:33 AM
09-07-2009 03:10 AM
Check out this link you may get some idea
Post back for queries.
09-07-2009 03:12 AM
This link provides command line arguements check out.
09-07-2009 05:41 AM
That's great, thanks for the useful links (especially the last one).
What I am trying to do is to create a VI wich compares the local computer time (obtained using the get date and time.vi) with the internet time.
09-07-2009 05:53 AM
Cheers
You might need to create a sequence of operations like register->resync->set time. A small study on the commands given in the table will reveal the entire activity required.
Kindly post when you have acheived it.
Post back for queries.
09-10-2009 01:47 AM
Done a lot of reading on this issue. I dont believe the w32tm.exe (any of the command line arguments or registry entries) will serve my purpose.
What I need to do is check whether the date set on a customers PC matches the internet time. I was hoping to use the inbuilt Windows time services to do this for reasons of reliability etc.
There is also the Windows NET TIME utility but I cannot get it to work. Does anyone know anything about it (I have specific questions about the commands but don't have my notes with me - i.e. /domain<computer>)?
The only other way I can do it is a simple TCP/IP call to NIST server.
What do people think is the best way to do this?
09-10-2009 01:50 AM
I don't want (or wont be able) my application to synchronise the system clock, just to check what it should be. My app will handle what to do if the computer time varies from the internet time.
Since my app will be deployed to Windows Vista I don't believe it will have the proper authority to change the clock setting anyway. True?