Data commit

This commit is contained in:
Ingy döt Net 2023-07-01 11:58:00 -04:00
parent 7387c8f97b
commit cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions

View file

@ -0,0 +1,22 @@
using Requests, Printf
function getusnotime()
const url = "http://tycho.usno.navy.mil/timer.pl"
s = try
get(url)
catch err
@sprintf "get(%s)\n => %s" url err
end
isa(s, Requests.Response) || return (s, false)
t = match(r"(?<=<BR>)(.*?UTC)", readstring(s))
isa(t, RegexMatch) || return (@sprintf("raw html:\n %s", readstring(s)), false)
return (t.match, true)
end
(t, issuccess) = getusnotime();
if issuccess
println("The USNO time is ", t)
else
println("Failed to fetch UNSO time:\n", t)
end

View file

@ -0,0 +1,17 @@
Failed to fetch UNSO time:
raw html:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final"//EN>
<html>
<body>
<TITLE>What time is it?</TITLE>
<H2> US Naval Observatory Master Clock Time</H2> <H3><PRE>
<BR>Apr. 20, 17:55:31 UTC Universal Time
<BR>Apr. 20, 01:55:31 PM EDT Eastern Time
<BR>Apr. 20, 12:55:31 PM CDT Central Time
<BR>Apr. 20, 11:55:31 AM MDT Mountain Time
<BR>Apr. 20, 10:55:31 AM PDT Pacific Time
<BR>Apr. 20, 09:55:31 AM AKDT Alaska Time
<BR>Apr. 20, 07:55:31 AM HAST Hawaii-Aleutian Time
</PRE></H3><P><A HREF="http://www.usno.navy.mil"> US Naval Observatory</A>
</body></html>