06-12-2017, 06:15 AM
I solved the problem thanks to this
Function Test_NistTime
Function Function11
Function Test_NistTime
function~
str Headers =
;Host: nist.time.gov
;Connection: keep-alive
;Cache-Control: max-age=0
;Upgrade-Insecure-Requests: 1
;User-Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36
;Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8
;Accept-Encoding: deflate, sdch
str ResponeHeader HTML
Http HttpWebRequest.Connect("http://nist.time.gov" 0 0 0)
,,HttpWebRequest.Get2("/actualtime.cgi?lzbc=siqm9b" HTML 0 INTERNET_FLAG_NO_COOKIES|INTERNET_FLAG_NO_CACHE_WRITE ResponeHeader Headers)
if(!findrx(HTML "(?<=\btime='')[^'''']*" 0 RX_DOTALL _s)>=0)
,DateTime t
,t.FromParts(1970 1 1)
,t.AddParts(0 0 0 0 0 val(_s 2))
,t.UtcToLocal()
ret t.ToStr(4)
Function Function11