Click to See Complete Forum and Search --> : Updating system time with VB Time...
Dan0331
Nov 14th, 1999, 10:02 PM
Hi Everyone,
Just had a quick question. Is it possible to allow someone to update thier system time with the time control in VB?
If so, please let me know how that is possible.
Thanks!
Serge
Nov 14th, 1999, 10:13 PM
Sure, using Time statement:
Dim MyTime
MyTime = #4:35:17 PM# ' Assign a time.
Time = MyTime ' Set system time to MyTime.
Regards,
------------------
Serge
Software Developer
Serge_Dymkov@vertexinc.com
Access8484@aol.com
ICQ#: 51055819 (http://www.icq.com/51055819)
[This message has been edited by Serge (edited 11-15-1999).]
Dan0331
Nov 14th, 1999, 10:26 PM
Will that code take the Mabry Time, and update the system time?
Serge
Nov 14th, 1999, 10:32 PM
What do you mean Marby Time???
------------------
Serge
Software Developer
Serge_Dymkov@vertexinc.com
Access8484@aol.com
ICQ#: 51055819 (http://www.icq.com/51055819)
Serge
Nov 15th, 1999, 12:48 AM
This is from MSDN:
Enabling Client Computers to Synchronize with Domain Time Source Server
For Windows NT client computers, type the following in the MS-DOS Command Prompt or add the following to the login script:
NET TIME /DOMAIN:<domain name> /SET
For Windows or MS-DOS based client computers, such as Windows, Windows for Workgroups, LAN Manager for MS-DOS or Microsoft Network Client for MS-DOS, type the following in the MS-DOS command prompt or add the following to the login script:
NET TIME /WORKGROUP:<domain name> /SET
NOTE: You can also synchronize all timesource computers with a master timesource computer using the command: NET TIME \\<computername> /SET. The master timesource computer can also be synchronized to an external time standard using the TIMESERV utility.
I hope this is what you're looking for.
Regards,
------------------
Serge
Software Developer
Serge_Dymkov@vertexinc.com
Access8484@aol.com
ICQ#: 51055819 (http://www.icq.com/51055819)
Serge
Nov 15th, 1999, 12:53 AM
Also from MSDN:
Remotely Synchronizing the Time Between Two Computers
Article ID: Q151712
The information in this article applies to:
Microsoft Windows NT Server versions 3.5, 3.51
SUMMARY
From time to time, you may need to synchronize a computer's time with that of another computer while lacking physical access to one or both computers. Using the AT Command Scheduler, you can issue a NET TIME command to the remote computer(s).
The following example shows how to synchronize the time for ComputerA with ComputerB in a situation where the user only has physical access to ComputerC.
1. From ComputerC, open a command prompt.
2. Type the following command:
"AT \\ComputerA <HH:MM:SS> /INTERACTIVE "NET TIME \\ComputerB /SET /Y""
(without the quotation marks)
This schedules the NET TIME command to run the next time ComputerA gets to
<HH:MM:SS>.
You can check the time on ComputerA by typing NET TIME \\COMPUTERA. This will display the time on the remote machine (though it may be inaccurate, based on ComputerA[ASCII 146]s time zone).
Regards,
------------------
Serge
Software Developer
Serge_Dymkov@vertexinc.com
Access8484@aol.com
ICQ#: 51055819 (http://www.icq.com/51055819)
[This message has been edited by Serge (edited 11-15-1999).]
Dan0331
Nov 15th, 1999, 01:52 AM
Hi Serge,
Your help is greatly appreciated. However, that's not quite what I was looking for. I need users to be able to push a button on thier version of the program that will match thier system time to that of the server time encoded within the program.
Thanks.
Dan0331
Nov 15th, 1999, 11:25 AM
Mabry makes different controls that you can use with VB 6.0. One of those options is a Time control that you can setup to pull the time from a remote server.
I'm writing a time clock program for a company with 13 employees, on 13 different PC's. I need a command that will allow them to match thier system time to the time of the remote server.
Hope this helps.
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.