Foxhound Posted August 16, 2011 Share Posted August 16, 2011 (edited) Here's a little snippet to quickly sync your system clock with that of NIST. #cs--------------- Sync Time By Foxhound Public Domain #ce -------------- #RequireAdmin _set_time(_get_time()) Func _get_time() $central = "http://nist.time.gov/timezone.cgi?Central/d/-6" $eastern = "http://nist.time.gov/timezone.cgi?Eastern/d/-5" $data = BinaryToString(InetRead($central)) $regex = "\d{1,2}:\d{1,2}:\d{1,2}" $match = StringRegExp($data, $regex, 3) if not IsArray($match) Then return false Return $match[1] EndFunc ;==>_get_time Func _set_time($time) if NOT $time Then Exit RunWait(@ComSpec & " /c " & 'time ' & $time, "", @SW_HIDE) EndFunc ;==>_set_time EDIT: Uhhh... why is the forum injecting BBCode into my post? Someone should get to work fixing that :S Edited August 16, 2011 by Foxhound BrewManNH 1 [quote]Quick YouTube To MP3 | Lyrics Finder | Internet Radio Player | GetWeather | TinyURLifier[/quote] Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now