Re: Updating time in php

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 2009-01-26 at 21:13 +0000, ceo@xxxxxxxxx wrote:
> > I'll add that if you went the JS route, then it would just be
> > replicating the system time, ie replicating the Windows clock. 
> 
> Actually, I did this thing once where I included the server time from PHP in the JS, then calculate the difference, then use JS to show the actual current "time" by offsetting from the known PHP server NTPD time the number of ELAPSED seconds on the JS side, what time it really was, regardless of how badly their clock was set.
> 
> It still seems like more of a "because you can" feature than a "because you should" in general.
> 
> The app I worked on was a countdown clock until some pre-defined event.

I don't show the current time, but I've done a couple of sites with
online examinations, and a requirement is that the remaining time be
shown for a given question-- and when the timer hits 0 it auto submits
(there is backend logic for a window of submission time after which the
the answer is marked incorrect). People who disable javascript are
warned that it is their responsibility to submit in a timely fashion. If
someone takes issue with the timer/submission process they are informed
to contact the appropriate officials.

So, I'd say sometimes this kind of functionality is certainly desirable.

Cheers,
Rob.
-- 
http://www.interjinn.com
Application and Templating Framework for PHP


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux