> Unfortunately no simple or neat solution given WeeWX is not daylight 
saving aware

Well, looking on how the template is coded, the simple solution is such a 
no-brainer, I didn't even think of it. And that although you proposed it, 
you wrote the above, that there ist no simple solution: "So I suspect the 
issue is just with the label. You are manually setting the day_delta to 30, 
why not simply hard code the label" which is the simple solution, so thank 
you for that.

https://github.com/brewster76/fuzzy-archer/blob/master/skins/Bootstrap/rain.html.inc#L20

But anyway, I also wonder what is really the issue. It may or may not be 
just the label. depending on how the day_delta sum is calculated. Is it the 
sum of the archive_day sums? Is it the sum of archive's rain column, over 
30 x 24h? 
When I manually calculate the sum of the last 6 days of the previous month, 
and add it to the current months sum, I am (currently) off by 0.1mm, which 
is exactly the amount that was measured after the current daytime on day 31 
in the past, from now. So the the data source is "archive" table, but I 
don't know if the DST changed could influence the total in a corner case. 
This total is wrong if you interpret the value as "sum of the latest 30 
calendar days", but may be correct, if interpreted as "sum of the latest 30 
x 24h". But I don't know if it is really calculated that way.



gjr80 schrieb am Donnerstag, 24. April 2025 um 10:45:09 UTC+2:

> Quite likely will fix itself once beyond 30 days since DST changeover 
> given that .length simply takes the difference in the start and stop 
> timestamps of the span. Unfortunately no simple or neat solution given 
> WeeWX is not daylight saving aware. 
>
> But I wonder what really is  the issue here? I expect the $span .length 
> tag to show the 'wrong' result, but I suspect the corresponding 
> $span.rain.sum tag used to display the last 30 days rain will in fact be 
> correct. So I suspect the issue is just with the label. You are manually 
> setting the day_delta to 30, why not simply hard code the label or use a 
> little cheetah python and set a variable to 30 and then use that variable 
> in the $span(day_delta=xxx).span.sum tag to produce the last 30 days rain 
> and then again to display the span in days. I expect that '24h' and '72h' 
> would suffer from similar problems, though probably not as noticeable due 
> to the short elapsed time until the issue resolves itself for those spans.
>
> Gary
>
>
>
> On Tuesday, 22 April 2025 at 07:24:23 UTC+12 michael.k...@gmx.at wrote:
>
>> Hello,
>>
>> $span(day_delta=30).length.day.format("%d")
>>
>> yields "29 days". I think this is because of the DST change in the 
>> station's time zone which was about three weeks ago, it used to show "30 
>> days", and I am confident it will again show "30 days", after the DST 
>> change is more than 30 days ago.
>> [image: 2025-04-21 21_16_53-The weather in AT, Salzburg, Hallein, Rif.png]
>> How would "DST-safe" expression look like?
>>
>>
>>

-- 
You received this message because you are subscribed to the Google Groups 
"weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to weewx-user+unsubscr...@googlegroups.com.
To view this discussion visit 
https://groups.google.com/d/msgid/weewx-user/f7284c79-ef84-4fbc-9bfd-8ef06bc9f368n%40googlegroups.com.

Reply via email to