Walter, I'll bet you have a Vantage station. Unfortunately, their memory stores things in *local time* without any indication of whether DST is in effect or not. So, as the data comes off the logger, there is no way to tell whether it's in standard time or daylight savings time. The Python library takes a guess and, most of the time, it's right, but not in the hour after DST goes into affect.
We have struggled with this for years, and have not found a satisfactory solution. A fix would require that WeeWX becomes "timezone aware," and constantly check if there is a transition. This means another library to install, just for Vantage users, just one hour a year. Not worth it. -tk On Sun, Mar 10, 2019 at 10:28 AM Walter Smith <[email protected]> wrote: > Hey, this is a minor problem and I admit I'm not handling it, but my > custom template is bombing off today. > > When debugging my template with this code: > > #for $seq1 in range(30) > <p> Time: $hour($hours_ago=$seq1).outTemp.lasttime Temp: > $hour($hours_ago=$seq1).outTemp.last </p> > #end for > > I get the following results: > > Time: 12:00:00 PM Temp: 40.2°F > Time: 11:00:00 AM Temp: 38.5°F > Time: 10:00:00 AM Temp: 37.0°F > Time: 09:00:00 AM Temp: 35.0°F > Time: 08:00:00 AM Temp: 33.7°F > Time: 07:00:00 AM Temp: 34.7°F > Time: 06:00:00 AM Temp: 35.0°F > Time: 05:00:00 AM Temp: 35.5°F > Time: 04:00:00 AM Temp: 36.2°F > Time: N/A Temp: N/A > Time: 03:00:00 AM Temp: 36.9°F > Time: 01:00:00 AM Temp: 38.2°F > Time: 12:00:00 AM Temp: 39.2°F > Time: 11:00:00 PM Temp: 40.1°F > Time: 10:00:00 PM Temp: 42.3°F > Time: 09:00:00 PM Temp: 46.4°F > Time: 08:00:00 PM Temp: 54.1°F > Time: 07:00:00 PM Temp: 52.8°F > Time: 06:00:00 PM Temp: 51.6°F > Time: 05:00:00 PM Temp: 50.8°F > Time: 04:00:00 PM Temp: 47.9°F > Time: 03:00:00 PM Temp: 43.6°F > Time: 02:00:00 PM Temp: 42.2°F > Time: 01:00:00 PM Temp: 39.1°F > Time: 12:00:00 PM Temp: 37.0°F > Time: 11:00:00 AM Temp: 35.8°F > Time: 10:00:00 AM Temp: 35.0°F > Time: 09:00:00 AM Temp: 34.4°F > Time: 08:00:00 AM Temp: 34.1°F > Time: 07:00:00 AM Temp: 34.0°F > > I get that there's no 2 AM but why am I getting a N/A between 3 AM and > 4AM? This debug code was run shortly after 12 PM today (3/10/19). Is it a > timing problem as Pi and Vantage move their clocks ahead? I looked at the > database and I didn't see any gaps there. > > Thanks, > > Walt > > -- > 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 [email protected]. > For more options, visit https://groups.google.com/d/optout. > -- 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 [email protected]. For more options, visit https://groups.google.com/d/optout.
