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

RESOLVED - NO LONGER A SUGGESTION - <#rollovertime>

A Forum to archive Cumulus MX development suggestions that have been rejected or solved by other means.
Post Reply
sfws
Posts: 1183
Joined: Fri 27 Jul 2012 11:29 am
Weather Station: Chas O, Maplin N96FY, N25FR
Operating System: rPi 3B+ with Buster (full)

RESOLVED - NO LONGER A SUGGESTION - <#rollovertime>

Post by sfws »

I noticed that MX web tags have an output parameter (tt) for adding AM or PM, but I can't find any code for am or pm (lower case). I used the latter in Cumulus 1, so having changed by global edit "am/pm" to "tt" I suddenly noticed the appearance of capitals all over my web pages. I use 9am/10am rollover and <#rollovertime> appears on some of my web pages (sometimes multiple times), it now looks odd to see these lower case "am" appearing amongst lots of capital AM and PM on the same web page.

You will understand context, as I write this, between tonight and tomorrow morning my web tag will change its value!

So this is a slightly odd request, would changing the output of <#rollovertime> from "9 am", 10 am", or "Midnight" to "9 AM", "10 AM", or "Midnight" be acceptable to others? At the moment, I have got round this by replacing the web tag with a PHP variable and using a Switch/Case approach to redefine the values. I was surprised by how many times I had used it on template pages that generate web pages.
Last edited by sfws on Wed 15 Apr 2020 8:54 pm, edited 1 time in total.
User avatar
mcrossley
Posts: 14384
Joined: Thu 07 Jan 2010 9:44 pm
Weather Station: Davis VP2/WLL
Operating System: Bullseye Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: <#rollovertime>

Post by mcrossley »

The time format used by CMX is defined by your locale settings. On my Windows dev machine I have the AM/PM indicators set to am/pm (they did default to AM/PM in EN_GB) and that is what the tag output produces. I only use 24 hour time on my live Linux box, but on there you are at the mercy of the locale defined in Mono.
sfws
Posts: 1183
Joined: Fri 27 Jul 2012 11:29 am
Weather Station: Chas O, Maplin N96FY, N25FR
Operating System: rPi 3B+ with Buster (full)

Re: <#rollovertime>

Post by sfws »

mcrossley wrote: Sun 29 Mar 2020 12:57 pm On my Windows dev machine I have the AM/PM indicators set to am/pm (they did default to AM/PM in EN_GB)
I can't see any way to select lowercase am/pm on my windows pc, how did you change away from EN_GB default?
I tried "God mode" control panel, that uses the "tt" format, and I tried "settings" that only offers capitals in drop down.
User avatar
mcrossley
Posts: 14384
Joined: Thu 07 Jan 2010 9:44 pm
Weather Station: Davis VP2/WLL
Operating System: Bullseye Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: <#rollovertime>

Post by mcrossley »

Correct it only offers capitals in the drop-downs, but you can type whatever you want in the field.
sfws
Posts: 1183
Joined: Fri 27 Jul 2012 11:29 am
Weather Station: Chas O, Maplin N96FY, N25FR
Operating System: rPi 3B+ with Buster (full)

Re: <#rollovertime>

Post by sfws »

mcrossley wrote: Mon 30 Mar 2020 10:54 am Correct it only offers capitals in the drop-downs, but you can type whatever you want in the field.
I only asked you because W10 does NOT allow me to type anything in the field either my limited access user, or my administrative user, any typing just selects an item in drop down or is ignored if that option does not exist. I specifically select which components I want out of hour, minute, and am/pm. If I select a short time format that includes the am/pm option, then I get it twice because it is added to minutes and added by the 'tt'.

Never mind, I will live with capitals for AM PM, I'm getting used to them now. In longer term I will use a PHP function to reformat all my times how I want them.
User avatar
mcrossley
Posts: 14384
Joined: Thu 07 Jan 2010 9:44 pm
Weather Station: Davis VP2/WLL
Operating System: Bullseye Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: <#rollovertime>

Post by mcrossley »

Hmm, does on my Windows 10 - latest build...
Capture.png
You do not have the required permissions to view the files attached to this post.
sfws
Posts: 1183
Joined: Fri 27 Jul 2012 11:29 am
Weather Station: Chas O, Maplin N96FY, N25FR
Operating System: rPi 3B+ with Buster (full)

Re: <#rollovertime>

Post by sfws »

Thank you so much. You can't get to that via "Settings", but in Control Panel -> Region -> Additional, I found it and changed it. Now I can remove all my PHP snippets to change format and get my old look back. Thank you again.
User avatar
mcrossley
Posts: 14384
Joined: Thu 07 Jan 2010 9:44 pm
Weather Station: Davis VP2/WLL
Operating System: Bullseye Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: <#rollovertime>

Post by mcrossley »

Yeah, if you can avoid the "dumbed down" Settings applet, do! :lol:
Post Reply