cloudy cloudy

Author Topic: AM/PM missing in Rainfall popup  (Read 1591 times)

0 Members and 1 Guest are viewing this topic.

Offline jwtaylor

  • Posts: 14
  • OS/Browser:
  • Win NT 10.0
  • Mozilla compatible
AM/PM missing in Rainfall popup
« on: June 29, 2017, 11:35:57 PM »
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!

Offline Weather Display

  • Posts: 87,431
  • Davis VP2
  • New Zealand
  • OS/Browser:
  • Win NT 10.0
  • Chrome 58.0.3029.110
    • Weather Display
Re: AM/PM missing in Rainfall popup
« Reply #1 on: June 30, 2017, 06:59:21 PM »
what is the custom tag?

Offline jwtaylor

  • Posts: 14
  • OS/Browser:
  • Win NT 10.0
  • Mozilla compatible
Re: AM/PM missing in Rainfall popup
« Reply #2 on: June 30, 2017, 10:41:40 PM »
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.

Offline Weather Display

  • Posts: 87,431
  • Davis VP2
  • New Zealand
  • OS/Browser:
  • Win NT 10.0
  • Chrome 58.0.3029.110
    • Weather Display
Re: AM/PM missing in Rainfall popup
« Reply #3 on: June 30, 2017, 11:31:37 PM »
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

Online Martyn

  • Davis VP2+ FARS/solar/UV
  • Posts: 996
  • Bristol, UK
  • OS/Browser:
  • Win 7/Srvr 2008R2
  • Firefox 54.0
    • Horfield/Filton, Bristol, UK weather station
Re: AM/PM missing in Rainfall popup
« Reply #4 on: July 01, 2017, 10:17:57 AM »
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.
« Last Edit: July 01, 2017, 10:21:50 AM by Martyn »
Martyn,
Bristol, UK

Twitter: https://twitter.com/HorfieldWeather
FB: https://www.facebook.com/bristolweather
CWOP: CW2888
WU: IBRISTOL3

Offline jwtaylor

  • Posts: 14
  • OS/Browser:
  • Win NT 10.0
  • Mozilla compatible
Re: AM/PM missing in Rainfall popup
« Reply #5 on: July 01, 2017, 11:27:30 AM »
I have requested the moderator to move this to the SteelSeries board.

Thank you, Martyn & Brian!