Welcome to the Cumulus Support forum.

Latest Cumulus MX V4 release 4.4.2 (build 4085) - 12 March 2025

Latest Cumulus MX V3 release 3.28.6 (build 3283) - 21 March 2024

Legacy Cumulus 1 release 1.9.4 (build 1099) - 28 November 2014
(a patch is available for 1.9.4 build 1099 that extends the date range of drop-down menus to 2030)

Download the Software (Cumulus MX / Cumulus 1 and other related items) from the Wiki

If you are posting a new Topic about an error or if you need help PLEASE read this first viewtopic.php?p=164080#p164080

Live Clock on a website?

Other discussion about creating web sites for Cumulus that doesn't have a specific subforum

Moderator: daj

duke

Live Clock on a website?

Post by duke »

I wanted to put a "live" clock on my website so visitors know what the station local time is. I down loaded and installed this.

Works well and is easily configured. But, where do these scripts get there data from? For example, how does it know when February has 29 days or BST happens?

Duke
b.e.wilson
Posts: 89
Joined: Tue 26 Jul 2011 11:07 pm
Weather Station: Davis Vantage VUE
Operating System: Windows 10
Location: Utah, United States
Contact:

Re: Live Clock on a website?

Post by b.e.wilson »

Clocks like this get the time from the computer on which they run. They show the same time shown in the tray. So I'll always see my own time when I visit your page, not your local time.
duke

Re: Live Clock on a website?

Post by duke »

So I'll always see my own time when I visit your page, not your local time.
That's not good, I didn't realise. :bash:

So how do I go about showing a live clock that shows the time at the station and accounts for BST etc?

Duke
User avatar
GraemeT
Posts: 312
Joined: Wed 21 Oct 2009 11:19 am
Weather Station: La Crosse WS-2355 & WS-2306
Operating System: Windoze 7, 10, 11
Location: Bayswater, Australia
Contact:

Re: Live Clock on a website?

Post by GraemeT »

Hi Duke

One way would be to use the php time() function to get the time from the server and then use it to update your js clock, but it could easily get a bit messy.

Also, there might be something useful here: http://www.haneng.com/Forums_Post.asp?id=11457&p=7
Cheers,
Graeme.
gemini06720
Posts: 1700
Joined: Mon 10 Aug 2009 10:16 pm
Weather Station: No weather station
Operating System: No operating system
Location: World...

Re: Live Clock on a website?

Post by gemini06720 »

duke wrote:So how do I go about showing a live clock that shows the time at the station and accounts for BST etc?
Duke, how about something like this: Analog Clock ;)

The JavaScript has the variable 'localZone' - if set to '1' the visitor's time is displayed; if set to '0' the clock can be set to display a specific timezone.
david3
Posts: 65
Joined: Sat 28 Jan 2012 4:03 pm
Weather Station: Davis Vantage Vue
Operating System: Debian 12 64bit for rpi

Re: Live Clock on a website?

Post by david3 »

You could try here, too:

http://timeanddate.com/clocks/free.html

You can choose whatever timezone you'd like with that one, and there's a lot of customization options.
duke

Re: Live Clock on a website?

Post by duke »

I just tried the version at http://timeanddate.com/clocks/free.html but the digital clock will not sit correctly in the line of text :? .

Ray, that has the features I require but I'm really after a digital so I can nest it into my existing text. Do you know if there is a digital with those features as i am not finding one on that site?

Duke
User avatar
steve
Cumulus Author
Posts: 26672
Joined: Mon 02 Jun 2008 6:49 pm
Weather Station: None
Operating System: None
Location: Vienne, France
Contact:

Re: Live Clock on a website?

Post by steve »

Steve
duke

Re: Live Clock on a website?

Post by duke »

Any use?
Yes, just the job. Thank you Steve. Even better with the date too.

Out of curiosity, where do scripts like this "GET" there data from?

Ray, your analogue clock is growing on me, I'm going to try and integrate it somewhere for a bit of nostalga.

Duke
User avatar
steve
Cumulus Author
Posts: 26672
Joined: Mon 02 Jun 2008 6:49 pm
Weather Station: None
Operating System: None
Location: Vienne, France
Contact:

Re: Live Clock on a website?

Post by steve »

duke wrote:Out of curiosity, where do scripts like this "GET" there data from?
That one takes the date and time from the PC that it's running on (i.e. from the person that's viewing your site), converts it to GMT, and then applies the appropriate offset to get to the time zone that you set it to.
Steve
duke

Re: Live Clock on a website?

Post by duke »

Thanks, perhaps some one from outside the UK would be kind enough to click below and check for me, thanks?

Duke
User avatar
steve
Cumulus Author
Posts: 26672
Joined: Mon 02 Jun 2008 6:49 pm
Weather Station: None
Operating System: None
Location: Vienne, France
Contact:

Re: Live Clock on a website?

Post by steve »

duke wrote:Thanks, perhaps some one from outside the UK would be kind enough to click below and check for me, thanks?
I'm not outside the UK, but my PC doesn't know that, so I pretended to be in Melbourne and Los Angeles, and it worked fine.
Steve
duke

Re: Live Clock on a website?

Post by duke »

steve wrote: I'm not outside the UK, but my PC doesn't know that, so I pretended to be in Melbourne and Los Angeles, and it worked fine.
:clap: Thanks.

Duke
User avatar
GraemeT
Posts: 312
Joined: Wed 21 Oct 2009 11:19 am
Weather Station: La Crosse WS-2355 & WS-2306
Operating System: Windoze 7, 10, 11
Location: Bayswater, Australia
Contact:

Re: Live Clock on a website?

Post by GraemeT »

Clock works for me Duke, in Firefox, IE and Chrome
Cheers,
Graeme.
duke

Re: Live Clock on a website?

Post by duke »

Thanks Graeme :D

Duke
Post Reply