29 lines
1.2 KiB
Plaintext
29 lines
1.2 KiB
Plaintext
;Task:
|
|
Create a program that downloads the time from this URL: [http://tycho.usno.navy.mil/cgi-bin/timer.pl http://tycho.usno.navy.mil/cgi-bin/timer.pl] and then prints the current UTC time by extracting just the UTC time from the web page's [[HTML]]. Alternatively, if the above url is not working, grab the first date/time off this page's talk page.
|
|
|
|
<!-- As of March 2014, the page is available
|
|
{{task|Networking and Web Interaction}}
|
|
|
|
The page http://tycho.usno.navy.mil/cgi-bin/timer.pl is no longer available since July 2011.
|
|
The relevant part of that page source looked like this:
|
|
<pre>
|
|
...
|
|
|
|
<TITLE>What time is it?</TITLE>
|
|
<H2> US Naval Observatory Master Clock Time</H2> <H3><PRE>
|
|
<BR>Jul. 27, 22:57:22 UTC Universal Time
|
|
<BR>Jul. 27, 06:57:22 PM EDT Eastern Time
|
|
<BR>Jul. 27, 05:57:22 PM CDT Central Time
|
|
<BR>Jul. 27, 04:57:22 PM MDT Mountain Time
|
|
<BR>Jul. 27, 03:57:22 PM PDT Pacific Time
|
|
<BR>Jul. 27, 02:57:22 PM AKDT Alaska Time
|
|
<BR>Jul. 27, 12:57:22 PM HAST Hawaii-Aleutian Time
|
|
|
|
...
|
|
</pre>
|
|
End of comment -->
|
|
|
|
If possible, only use libraries that come at no ''extra'' monetary cost with the programming language and that are widely available and popular such as [http://www.cpan.org/ CPAN] for Perl or [[Boost]] for C++.
|
|
<br><br>
|
|
|