Welcome to the Cumulus Support forum.

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

Cumulus MX V4 beta test release 4.0.0 (build 4018) - 28 March 2024

Legacy Cumulus 1 release v1.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

24 Hour Time

From build 3044 the development baton passed to Mark Crossley. Mark has been responsible for all the Builds since. He has made the code available on GitHub. It is Mark's hope that others will join in this development, but at the very least he welcomes your ideas for future developments (see Cumulus MX Development suggestions).

Moderator: mcrossley

Post Reply
xlrcomm
Posts: 6
Joined: Sun 09 Dec 2012 1:18 am
Weather Station: Fine Offset with UV light sensor
Operating System: RPi Stretch
Location: Gosnells WA

24 Hour Time

Post by xlrcomm »

My web pages all show page updated time in 12 hour format.

Code: Select all

charts by Highcharts
page updated 5/06/2019 9:10:01 PM
powered by Cumulus v3.0.0 (3050) 
Noticed the same on some data pages, ie 'This Month' and 'This Year'. All other pages have 24 Hour time.

How can I get all times to be in 24 Hour. I've looked though files but can not see anywhere to change this.

I've tried to use the forum search feature, but it crashes when I try "24 hour" :(

Cheers
Rick
Perth, Western Australia
User avatar
mcrossley
Posts: 12694
Joined: Thu 07 Jan 2010 9:44 pm
Weather Station: Davis VP2/WLL
Operating System: Bullseye Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: 24 Hour Time

Post by mcrossley »

You can specify a time format string to all date/time type webtags - read up in the Wiki about how to do this. You will have to edit the web site template files to achieve this. There is no global setting to do what you want - maybe there should be, but it's another for the (very long) todo list!
xlrcomm
Posts: 6
Joined: Sun 09 Dec 2012 1:18 am
Weather Station: Fine Offset with UV light sensor
Operating System: RPi Stretch
Location: Gosnells WA

Re: 24 Hour Time

Post by xlrcomm »

mcrossley wrote: Fri 07 Jun 2019 9:35 am You can specify a time format string to all date/time type webtags - read up in the Wiki about how to do this. You will have to edit the web site template files to achieve this. There is no global setting to do what you want - maybe there should be, but it's another for the (very long) todo list!
Thanks Mark.
Yes, that's exactly what I've done now. Edited all the affected pages to include 'format="HH:mm"', including credit on every page.
What puzzles me is that most of the webtags are in 24 hour format. Only a couple pages (thismonthT.htm & thisyearT.htm) webtags use 12 hour format. That's weird.

What I can't work out is the files for the local web port 8998. todayyest.html & records.html are also 12 hour format. That's a tad beyond me.

Cheers,
Rick
Perth, Western Australia
f4phlyer
Posts: 144
Joined: Sun 13 Feb 2011 7:12 pm
Weather Station: Davis Vantage Pro 2
Operating System: RaspBerry Pi Win 10 OSx
Location: Spring, Texas USA
Contact:

Re: 24 Hour Time

Post by f4phlyer »

You might check in the CumulusMX/interface folder/directory, I think that's where the local interface web pages are generated.
retreat at augusta pines weather
CumulusMX on Raspberry π rPi5
http://augusta-pines-weather.com / CumulusMX 4.0.0 build:4017
WeatherUnderground KTXSPRIN538
xlrcomm
Posts: 6
Joined: Sun 09 Dec 2012 1:18 am
Weather Station: Fine Offset with UV light sensor
Operating System: RPi Stretch
Location: Gosnells WA

Re: 24 Hour Time

Post by xlrcomm »

f4phlyer wrote: Sun 09 Jun 2019 3:03 am You might check in the CumulusMX/interface folder/directory, I think that's where the local interface web pages are generated.
Yes, they are, but alas not so simple.

The html has many calls to javascript files and datatables. I've had a look at the .js and I'm lost. Way beyond me :(

Cheers,
Rick
Perth, Western Australia
User avatar
mcrossley
Posts: 12694
Joined: Thu 07 Jan 2010 9:44 pm
Weather Station: Davis VP2/WLL
Operating System: Bullseye Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: 24 Hour Time

Post by mcrossley »

The data for the admin interface is provided in a json feed. Not something you can alter at source, but you *could* manipulate it in the admin pages themselves. As it they are really meant for just that, admin and a look-see, I do not recommend changing them, they are sometimes updated in new releases.
xlrcomm
Posts: 6
Joined: Sun 09 Dec 2012 1:18 am
Weather Station: Fine Offset with UV light sensor
Operating System: RPi Stretch
Location: Gosnells WA

Re: 24 Hour Time

Post by xlrcomm »

mcrossley wrote: Sun 16 Jun 2019 6:46 pm The data for the admin interface is provided in a json feed. Not something you can alter at source, but you *could* manipulate it in the admin pages themselves. As it they are really meant for just that, admin and a look-see, I do not recommend changing them, they are sometimes updated in new releases.
I've looked at the admin html pages (todayyest.html) and 'format="HH:mm"' does not work.
If fact, I've deleted whole sections, ie

Code: Select all

                        <tr>
                            <td>Outdoor Humidity</td>
                            <td><span id="OutdoorHum">--</span></td>
                            <td><span>%</span></td>
                        </tr>
                        <tr>
                            <td>Indoor Humidity</td>
                            <td><span id="IndoorHum">--</span></td>
                            <td><span>%</span></td>
                        </tr>
from

Code: Select all

<table id="HumidityTable" style="width:100%">
                        <thead>
                            <tr>
                                <th>&nbsp;Humidity</th>
                                <th></th>
                                <th></th>
                                <th></th>
                                <th></th>
                            </tr>
                            <tr>
                                <th>&nbsp;</th>
                                <th colspan="2">Today</th>
                                <th colspan="2">Yesterday</th>
                            </tr>
                        </thead>
                        <tr>
                            <td>Outdoor Humidity</td>
                            <td><span id="OutdoorHum">--</span></td>
                            <td><span>%</span></td>
                        </tr>
                        <tr>
                            <td>Indoor Humidity</td>
                            <td><span id="IndoorHum">--</span></td>
                            <td><span>%</span></td>
                        </tr>
                    </table>
and the resultant web page doesn't change. So I think the formatting etc comes from the json feed.
Too hard for me, so I leave it as it is. Maybe one day the code will be updated.

Thanks for the help :)
Cheers,
Rick
Perth, Western Australia
Post Reply