AM/PM missing in Rainfall popup

First, thanks to everyone involved in making WD, SS Gauges, wxgraphs and jpgraph available to the weather community. I am in the process of configuring SS Gauges with a Weather Display front end and am very impressed with the quality of the software and the ease of customizing it. Great job!

Now my question. Everything seems to be working as expected with the single exception that the pop-up for the Rainfall gauge shows “Last rain” without an AM/PM indicator. In my test system the last rain was at 3:38 AM and the pop-up says only that it was at 3:38. I don’t know if this display (only) is using a 24 hour clock since I haven’t had a PM rain event during testing. However, all of the other pop-ups are correctly showing 12 hour clock info (as configured) with the appropriate AM/PM indicator.

I don’t know if this is a problem with a WD “raw” file, a configuration issue in SS Gauges or a bug.

Any suggestions will be most welcome. Thank you!


Rain Pop-Up Screen Shot.docx (314 KB)

what is the custom tag?

It looks like the pop-up is referencing the “LastRainTipISO” tag. Here is the value in the current customclientraw.txt file which corresponds to the current pop-up:

“LastRainTipISO”:“6/30/2017 2:38 AM”

The pop-up is displaying:

Last Rain: Today at 2:38

This is a built-in function of the Rainfall gauge that is part of the standard SteelSeries download. I’ve checked a number of other sites running SS Gauges and they all are missing the AM/PM indicator for this gauge while displaying AM/PM for all other gauges. So, it looks like it may be a bug in the SS program.

the time is provided by the WD custom tag %timeoflastrainalways%
that should be using am/pm if you have the time format in WD to use that
but maybe your last rain tip was before you set to use am/pm
i.e see what it shows after your next rain tip

the time value is stored in WD’s wdisplay.ini file as
[time of last rain]
always value=

see what shows there

Hi,
I think this may be down to the coding in the gauges.js script itself so would be a question for the script author (mcrossley). I use 24 hour times so I cannot test this but looking at the code I see the tag LastRainTipISO is split into an array by spaces so “6/30/2017 2:38 AM” would result in the date being array value 0, then the time is value 1 and the AM/PM indicator is value 2. The script then manipulates values 0 and 1 of the array but doesn’t include value 2 when generatiing the pop-up tooltip so the AM/PM is ignored.
It would be a case of changing a couple of lines of code to get this to work. I am not running the latest version of the script but downloaded that to check if this was still the case and it is. I suggest this topic is moved to the Steel Series board as it is not a WD issue per se.

I have requested the moderator to move this to the SteelSeries board.

Thank you, Martyn & Brian!