In WeeWX, intervals are consistently open on the left, closed on the right.
That means that the first archive interval of the day runs from a split
second after 0000 and ends precisely at 0005. A temperature timestamped at
0000 will be included in the previous day's statistics. Same with rain:
rain that is timestamped 0000 will be included in the previous day's total.

Same with days: a day starts a split second after midnight, and ends
precisely at the next midnight. Unfortunately, with the WU, if you
timestamp something 0000 it includes it in the current day, not the
previous day. It's as if the day started 5 minutes before midnight, then
ends 5 minutes before the next midnight.

I'm not keen on making this behavior optional because so much of the code
depends on the convention of open on the left, closed on the right. At the
very least, if the option was exercised, all database queries would have to
be reformatted.

At the end of the day (pun intended), I decided to indulge the WU, but I
don't think it's a good idea in general.

-tk

On Wed, Apr 20, 2022 at 7:39 AM Greg Troxel <[email protected]> wrote:

>
> Karen K <[email protected]> writes:
>
> > The general way of WeeWX is to think of an archive interval to be open
> at
> > the left end and closed at the right end. This is because it records the
> > readings of the last 5 minutes.
>
> Thanks; I was unclear on that and (] seems sensible.
>
> > Actually if you show yesterday rain ($yesterday.rain.sum) and today rain
> (
> > dayRain) then the rain between 23:55 and 00:00 ist included in the
> > yesterday rain as well as in the today rain. If you add it together,
> then
> > you get a higher value than the rain of those 2 days together.
>
> That sounds like a bug.   Surely it should be in one or the other, and I
> think it's 99% clear it belons in $yesterday.
>
> --
> You received this message because you are subscribed to the Google Groups
> "weewx-development" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/weewx-development/rmi5yn3q0nn.fsf%40s1.lexort.com
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"weewx-development" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-development/CAPq0zEDA_y%3D94v5G%3DYVp4P%3DZW90e_sEYvqkH0_SxWb-bm-fCjg%40mail.gmail.com.

Reply via email to