Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
QM DATE conversion
#3
I solved the problem thanks to this

Function Test_NistTime
Code:
Copy      Help
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
Code:
Copy      Help
str UTC=Test_NistTime
out UTC


Messages In This Thread

Forum Jump:


Users browsing this thread: 8 Guest(s)