UTC TIME

  • epson
  • Born
  • Born
  • epson
  • Posts: 2

Post 3+ Months Ago

Does anybody have the source code for likning of UTC time - to be shown on web page in real time? :shock:
  • Anonymous
  • Bot
  • No Avatar
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

  • Managedlinks
  • Proficient
  • Proficient
  • Managedlinks
  • Posts: 294

Post 3+ Months Ago

try this place


http://search.able2know.com/Web_Develop ... me___Date/

lots of different ones to choose from

to convert to UTC have a look at this page, it tells you which functions to change

http://www.course.com/downloads/newpers ... dixD03.htm
  • epson
  • Born
  • Born
  • epson
  • Posts: 2

Post 3+ Months Ago

Many thanks for these links /more java scripts - I like it/ but unfortunately it's not solving my 'problem'.

I'll show you an example:

if you put into body of your page this: <img src="http://data.meteo.sk/zadarmo/freeza2.php?user=211"

then you'll see online the current wheather report online each day.

And what I need is to find out some provider or servis (or how to call it ...) where the exact UTC time can be loaded online with refresh by sec. with using such a similar code. Because I ned to use it on very specific site where the time from local host and either from web server is not acceptable.
  • Managedlinks
  • Proficient
  • Proficient
  • Managedlinks
  • Posts: 294

Post 3+ Months Ago

That link certainly does not update itself. its just an image, you would need to click refresh to get it to update.

That being said you could have a script. the source of the script could be a program that fetches the current time from a time server.

a time server is a machine that has an accurate time clock used to keep other servers synchronised

i.e.
Code: [ Select ]
<script language="javascript" src="http://www.yourdomain.com/cgi-bin/time.js.pl"> </script>


the javascript would be loaded with an accurate time and would then simply refresh the text every second with an updated time

the accuracy would be rough eg if it takes a second for the server to respond the time could be out by a second you need to allow for this in your script.

I don't know if such a script exists but should only take an hour or so to create and test
  • Managedlinks
  • Proficient
  • Proficient
  • Managedlinks
  • Posts: 294

Post 3+ Months Ago

take a look at this page

http://www.lagado.com/tools/time
  • s15199d
  • Expert
  • Expert
  • User avatar
  • Posts: 524
  • Loc: NC, USA

Post 3+ Months Ago

Great post. Yea, it appears to me that you could post the time from that world clock server. Doesn't sound like rocket science. I guess the only trick then is to constantly refresh your page. Which does pose a bit of a challenge. But seems doable.
  • Managedlinks
  • Proficient
  • Proficient
  • Managedlinks
  • Posts: 294

Post 3+ Months Ago

No Need to refresh the page.

Just get the javascript to display the updated time at set intervals, using the setTimeout function.

when the script is originally loaded from the server it is initialised with the current time. all it needs to do then is to increment a counter every second.

this would of course be very rough, it would depend on how accurate you need the time to be and how long the browser window stays on that page.

if you are worried about people disabling javascript, similar results could be obtained with an <iframe> the loaded page could then have a refresh time set so it refreshes itself every second.

That way only the small <iframe> is refreshed not the whole page which could be annoying.

Post Information

  • Total Posts in this topic: 7 posts
  • Users browsing this forum: No registered users and 128 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.