Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.soft-sys.math.mathematica > #4423

Re: Getting the Date and Time From a Time Server

From "Hans Michel" <hmichel@cox.net>
Newsgroups comp.soft-sys.math.mathematica
Subject Re: Getting the Date and Time From a Time Server
Date 2011-08-15 06:27 +0000
Organization Steven M. Christensen and Associates, Inc and MathTensor, Inc.
Message-ID <j2ae7q$9cj$1@smc.vnet.net> (permalink)
References <201108131047.GAA25453@smc.vnet.net> <201108150021.UAA07545@smc.vnet.net>

Show all headers | View raw


CellPrint[
 Cell[Import["http://tycho.usno.navy.mil/cgi-bin/timer.pl"], "Text", 
  CellTags -> "TimeStamp", Editable -> False, 
  TrackCellChangeTimes -> True, ShowCellBracket -> False, 
  CellOpen -> True, Deletable -> False, Copyable -> False, 
  Selectable -> False, Deployed -> True]]

For the purposed of demonstration CellOpen -> True but if you intend to use
this you would want to set this option to CellOpen -> False. You may want to
hide the output from the student. 

Apparently you need the timestamp when a student claims they have finished a
project. This way you don't track every action. You just want to be fair and
make certain that everyone has made the deadline.

If notebook history is turned on then using the "Cell > Notebook History
..." may also help.

Also see if

"Prefences > Internet Connectivity > Proxy Settings > Direct Connection to
the Internet" works for other solutions offered. It may be the proxy setting
blocking you ports.

The following URL were usable from my browser, most were not usable in the
Import function 
http://www.atomictime.net:1313/
http://www.atomictime.net/time_tel.html?2
http://www.atomictime.net/time_tel.html?4
http://tycho.usno.navy.mil/cgi-bin/timer.pl * (Usable with Import)
http://tycho.usno.navy.mil/cgi-bin/anim
http://nist.time.gov:8013/
This port return number of milliseconds since {1970,1,1,0,0,0}

Hans

-----Original Message-----
From: Gregory Lypny [mailto:gregory.lypny@videotron.ca] 
Sent: Sunday, August 14, 2011 7:21 PM
Subject: Re: Getting the Date and Time From a Time Server

Thanks Bobby,

Yes, most computers are connected and do keep time in between syncs.  But it
is easy for a student, who was supposed to submit something by a deadline
but is late, to reset their clock and calendar, and create a file that is
backdated to before the deadline.  If my submission system works on the
client side, with Mathematica putting a date- and time-stamp in the file at
their machine, it is a problem.  Of course, when the file arrives at my
machine, it will be given a creation date and time according to my systems
settings, which will be correct, or at least consistent across submissions,
as long as I am in sync.  I just thought it would be nice to have the stamp
right in the file (client), but it is certainly no problem for me to loop
through the submissions on my side to make sure that the dates and times
make sense.

I just wanted to experiment with both.

Regards,

Gregory



On Sat, Aug 13, 2011, at 1:48 PM, DrMajorBob wrote:

> My computer is almost always connected to the Internet, and it keeps time
(like any clock) between synchs.
> 
> I doubt that retrieving time from the Internet can be more accurate, given
the communication latencies involved.
> 
> Do you think Import from a URL is instantaneous?
> 
> Bobby


Back to comp.soft-sys.math.mathematica | Previous | Next | Find similar | Unroll thread


Thread

Re: Getting the Date and Time From a Time Server "Hans Michel" <hmichel@cox.net> - 2011-08-15 06:27 +0000

csiph-web