HighDots Forums  

Add Mac- and PC-friendly clocks to a site?

Website Design comp.infosystems.www.authoring.site-design


Discuss Add Mac- and PC-friendly clocks to a site? in the Website Design forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
stevecap@dca.net
 
Posts: n/a

Default Add Mac- and PC-friendly clocks to a site? - 02-14-2005 , 05:13 PM






I have a customer who wants clocks for several time zones to display on
her site. We found a Java clock that displays the time for three
cities based on the client computer's internal clock and internal time
zone.

It works beautifully if the client computer is a PC. On Macs
(depending which browser you use) the clocks either don't display at
all or they show a time that bears no clear relationship to the
machine's internal time. It's not even off by an even number of hours,
and different Macs running different OS's display different times.

Is there a platform-neutral solution to this?

Thank you in advance for your wise counsel.

--
Steven Capsuto
Philadelphia, PA, USA


Reply With Quote
  #2  
Old   
Stephen Poley
 
Posts: n/a

Default Re: Add Mac- and PC-friendly clocks to a site? - 02-15-2005 , 01:41 PM






On 14 Feb 2005 14:13:58 -0800, "stevecap (AT) dca (DOT) net" <stevecap (AT) dca (DOT) net>
wrote:

Quote:
I have a customer who wants clocks for several time zones to display on
her site. We found a Java clock that displays the time for three
cities based on the client computer's internal clock and internal time
zone.

It works beautifully if the client computer is a PC. On Macs
(depending which browser you use) the clocks either don't display at
all or they show a time that bears no clear relationship to the
machine's internal time. It's not even off by an even number of hours,
and different Macs running different OS's display different times.

Is there a platform-neutral solution to this?

Thank you in advance for your wise counsel.
There's no reliable way of doing this based on the client computer.
Quite a few people don't bother setting their clocks accurately.
Probably even more don't bother setting their time zones accurately.
And I have more than once met idiotic software that requires the
computer using it to have particular settings which may bear no
resemblance to reality. If people are under the impression that the site
is serving up reliable information when it isn't, that could be pretty
misleading.

If it was important to do this (which I rather doubt) I'd deliver a base
time from the web server, calculate the difference from the client clock
at the moment the application starts, and then just use the client clock
to track elapsed time from the base time. But you'd probably have to
program it yourself. And watch out for caching issues etc.

--
Stephen Poley

http://www.xs4all.nl/~sbpoley/webmatters/


Reply With Quote
  #3  
Old   
Andy Dingley
 
Posts: n/a

Default Re: Add Mac- and PC-friendly clocks to a site? - 02-18-2005 , 07:10 PM



On Tue, 15 Feb 2005 19:41:52 +0100, Stephen Poley
<sbpoleySpicedHamTrap (AT) xs4all (DOT) nl> wrote:

Quote:
There's no reliable way of doing this based on the client computer.
Quite a few people don't bother setting their clocks accurately.
I was once forced into doing this. So I generated on the server some
client-side JavaScript, with a timestamp coded into it. If the
client's clock matched the server's clock (known accurate) within a
minute or two, the clock displayed and started ticking. If there was a
mismatch, it didn't appear.


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.