Page 1 of 1

24 Hour Time

Posted: Wed 05 Jun 2019 1:31 pm
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

Re: 24 Hour Time

Posted: Fri 07 Jun 2019 9:35 am
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!

Re: 24 Hour Time

Posted: Sat 08 Jun 2019 2:46 am
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,

Re: 24 Hour Time

Posted: Sun 09 Jun 2019 3:03 am
by f4phlyer
You might check in the CumulusMX/interface folder/directory, I think that's where the local interface web pages are generated.

Re: 24 Hour Time

Posted: Sun 09 Jun 2019 3:25 am
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,

Re: 24 Hour Time

Posted: Sun 16 Jun 2019 6:46 pm
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.

Re: 24 Hour Time

Posted: Tue 18 Jun 2019 12:49 am
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,