Page 1 of 1

Issue With Daylight Hours When Using AM/PM

Posted: Tue 07 Apr 2015 4:32 am
by Buford T. Justice
I just noticed on my main page that the sun will rise at 6:11 AM and set at 7:58 PM giving 1:47 of Daylight Hours. I am sure this is because I use AM/PM on my website (being in USA) instead of 24-hour time. Anyway around this while retaining AM/PM?

Re: Issue With Daylight Hours When Using AM/PM

Posted: Tue 07 Apr 2015 7:20 am
by steve
The <#DaylightLength> web tag should work whether you are using a 12-hour or 24-hour clock on your PC. Please paste the 'almanac' section of your template here.

Re: Issue With Daylight Hours When Using AM/PM

Posted: Tue 07 Apr 2015 8:23 am
by mcrossley
I had that because I carried over an 'hh:mm' format in the daylightlength tag from my C1 PHP tag files, it needs to change to 'HH:mm' for Cumulus MX.

Re: Issue With Daylight Hours When Using AM/PM

Posted: Tue 07 Apr 2015 8:35 am
by steve
The default in MX is HH:mm, so you could just remove the parameter. The default in C1 also gives me hh:mm automatically, but perhaps US users need a format parameter for that?

Re: Issue With Daylight Hours When Using AM/PM

Posted: Tue 07 Apr 2015 9:10 am
by mcrossley
I should have made it clear, I use a customised format string in my PHP tags file for #DayLightLength, not the default (no format string). I only noticed once the day length exceeded 12 hours.

Re: Issue With Daylight Hours When Using AM/PM

Posted: Tue 07 Apr 2015 9:18 am
by steve
Ah OK, understood.

Re: Issue With Daylight Hours When Using AM/PM

Posted: Tue 07 Apr 2015 6:21 pm
by Buford T. Justice
mcrossley wrote:I had that because I carried over an 'hh:mm' format in the daylightlength tag from my C1 PHP tag files, it needs to change to 'HH:mm' for Cumulus MX.
That was the issue. Thanks. I overlooked changing those values from lowercase h to uppercase H.

For times here in the USA, I use format="H:mm tt" for AM/PM and format=H:mm for total times.

Re: Issue With Daylight Hours When Using AM/PM

Posted: Sat 25 Jul 2015 8:57 pm
by mwijas
Buford T. Justice wrote:
For times here in the USA, I use format="H:mm tt" for AM/PM and format=H:mm for total times.
I too am in the USA and would like to use AM/PM format (as stated above). However, I am new to Cumulus and cannot find where to change this. I see the 12 hour /24 hour setting in the NOAA config, but that seems to be specific to NOAA. Any help would be much appreciated!

Re: Issue With Daylight Hours When Using AM/PM

Posted: Sun 26 Jul 2015 8:40 am
by steve
mwijas wrote:I too am in the USA and would like to use AM/PM format (as stated above). However, I am new to Cumulus and cannot find where to change this. I see the 12 hour /24 hour setting in the NOAA config, but that seems to be specific to NOAA. Any help would be much appreciated!
This section of the forum is about Cumulus MX - is that what you are using? MX should display most dates and times in the format that is being used by the system that it's running on.

It is not possible to change the date and time formats in Cumulus 1, other than the clock on the main screen.

Re: Issue With Daylight Hours When Using AM/PM

Posted: Sun 26 Jul 2015 4:06 pm
by mwijas
Yes, I am using the most current beta of Cumulus MX, which I just did a fresh install of a few days ago. It is running on Windows 7 and I can confirm it is not using the time format of the system. Based on the prior post of Buford T. Justice, it seemed that he also had the same issue, which he was able to resolve by changing the format settings. My question is where can this change be made?

Re: Issue With Daylight Hours When Using AM/PM

Posted: Sun 26 Jul 2015 5:32 pm
by steve
The date and time formats on the 'dashboard' page in the user interface in MX cannot currently be changed - perhaps they will be in future. MX should be using the system date and time formats elsewhere in the user interface - is it not doing that? If you want to change the format of the dates and times on a web site, then as described above, you need to use a 'format' parameter on the web tags. The format parameter is described in the wiki, on the web tags page - http://wiki.sandaysoft.com/a/Webtags.