Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.
Keywords: server time
If you are running TCP/IP on the server, you might be able to use the WinSock Internet extender to query the datetime port. Ummm something like...
AddExtender("wwwsk34I.dll") talksocket=SOpen() yyy=wxGetLastErr() Terminate(yyy!=0,"Sopen",yyy) ret=SConnect(talksocket,"muss.cis.mcmaster.ca","daytime") yyy=wxGetLastErr() Terminate(yyy!=0,"Sconnect",yyy) xxx=sRecvLine(talksocket,555) sClose(talksocket) Message("daytime",xxx) ;The following should be used WITH EXTREME CAUTION to set the time on Y2K!!! ;It could has disasterous consequences if (1) the server is not "daytime" served, in other ;words, the simple network protocol, daytime, must be set on the server. This protocol allows a ;Windows NT computer to respond to requests from other systems that support the daytime protocol. ;(2) if a zillion different PCs are trying to run it on Y2K, (3) probably not a good idea ;to try to automate such a thing anyway, but here 'tis for the brave and not faint hearted: a=ItemExtract(4,xxx," ") hour=ItemExtract(1,a,":") minute=ItemExtract(2,a,":") seconds=ItemExtract(3,a,":") Message(hour, "%minute%%@crlf%%seconds%") year=2000 month=01 day=01 Intcontrol(58, strcat(year,":",month,":",day,":",hour,":",minute,":",seconds),0,0,0)
DOS programs: PCK300.zip, Time_s.zip, Tset72.zip, timesy.zip all in the IBMSYS forum in section 1.
Windows programs: SetTm1.zip in WinShare forum, section 3.
Article ID: W13873
Filename: How to Get Server Time.txt
File Created: 2001:03:01:12:15:36
Last Updated: 2001:03:01:12:15:36