How can one use the GMT time and set system clock to the time we get from GMT
Printable View
How can one use the GMT time and set system clock to the time we get from GMT
welcome to the forums! :)
and I would like to help but I can only say about setting the system time. sorry . :(
Use the SetSystemTime API
wamanma,
You would need to get the time from the website location of one of several NTP servers around the world. The most commonly used one are the Navy's. Look here for servers http://tycho.usno.navy.mil/ntp.html
I believe this is what you want.
A simple way to do this ;)
VB Code:
Private Sub Command1_Click() 'What ever time is in txtTime, that will set the time. e.g. 15:38:00 Time = txtTime.Text End Sub 'But you will need some error checking for the time entered
Search the forum for GMT and/or Universal Time. I think you will find some code.
Don't forget that you'll need to identify the offset (timezone) if you want the time to reflect local time. I *thought* I had some code here for doing that but danged if I can find it now (I do remember it took me some time to figure out so hopefully I didn't delete it).