Page 1 of 1
RESOLVED - NO LONGER A SUGGESTION - <#rollovertime>
Posted: Sat 28 Mar 2020 8:17 pm
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.
Re: <#rollovertime>
Posted: Sun 29 Mar 2020 12:57 pm
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.
Re: <#rollovertime>
Posted: Sun 29 Mar 2020 2:25 pm
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.
Re: <#rollovertime>
Posted: Mon 30 Mar 2020 10:54 am
by mcrossley
Correct it only offers capitals in the drop-downs, but you can type whatever you want in the field.
Re: <#rollovertime>
Posted: Tue 31 Mar 2020 8:44 am
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.
Re: <#rollovertime>
Posted: Tue 31 Mar 2020 10:20 am
by mcrossley
Hmm, does on my Windows 10 - latest build...
Capture.png
Re: <#rollovertime>
Posted: Tue 31 Mar 2020 1:09 pm
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.
Re: <#rollovertime>
Posted: Tue 31 Mar 2020 1:12 pm
by mcrossley
Yeah, if you can avoid the "dumbed down" Settings applet, do!
