|
-
Aug 3rd, 2005, 04:32 AM
#1
Thread Starter
New Member
How to get GMT time and set system clock accordingly
How can one use the GMT time and set system clock to the time we get from GMT
-
Aug 3rd, 2005, 04:39 AM
#2
Re: How to get GMT time and set system clock accordingly
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
-
Aug 3rd, 2005, 04:52 AM
#3
Re: How to get GMT time and set system clock accordingly
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.
-
Aug 3rd, 2005, 05:20 AM
#4
Re: How to get GMT time and set system clock accordingly
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
Keith
I've been programming with VB for 25 years. Started with VB4 16bit Pro, VB5 Pro, VB6 Pro/Enterprise and now VB3 Pro. But I'm no expert, I'm still learning.
-
Aug 3rd, 2005, 10:56 AM
#5
PowerPoster
Re: How to get GMT time and set system clock accordingly
Search the forum for GMT and/or Universal Time. I think you will find some code.
-
Aug 3rd, 2005, 02:16 PM
#6
Fanatic Member
Re: How to get GMT time and set system clock accordingly
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).
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|