roe-dl/weewx-GTS

get only time of the day where GTS was reached...?

peters77 opened this issue · 2 comments

Hi,

thanks for this great weewx-addon. I'm using it now and it's pretty sweet.
I have a problem:I added this in my weewx index file:

                      <tr>
                        <td>Grünlandtemperatur <200 erreicht am</td>
                        <td>$day.GTSdate.last</td>
                      </tr>

But I got only the time of the value of 200 if it was reached (in this case it was reached two days ago here)!?

`

Grünlandtemperatur <200 erreicht am 00:27

`
Do I something wrong? I would like to get the date too, like
3 Tage, 22 Stunden, 4 Minuten
, or
03.03.2021 14:28.

Any hint howt get something like this would be great!

Thanks in advance!

Christian

You could write
$day.GTSdate.last.format("%d.%m.%Y")
$current.GTSdate
Both result in diplaying the date.

Additionally you may want to replace < (meaning "less than") by &lt; (less than ) or better &gt; (greater than)

Perfect, this works
$day.GTSdate.last.format("%d.%m.%Y")
nicely.
I even changed to greater than....thank you very much! :-)

Grünlandtemperatur >200 erreicht am 22.03.2021