Thank you, now I understand. In the meantime this glitch disappeared, as expected, since the DST change is more than 30 days ago. No I've got some time to think about, how to deal with it :D
Karen K schrieb am Samstag, 26. April 2025 um 18:47:45 UTC+2: > [email protected] schrieb am Samstag, 26. April 2025 um 13:01:58 UTC+2: > > I still don't get it. A system that isn't DST aware, shouldn't produce DST > related differences. If it does, it fails to make sure, that it strips any > DST related offsets for values that may be passed, before doing it's > calculations. > > > You may want to read about Python's datetime module. > > As I said before, time can be a scalar value of seconds or a tuple > containing year, month, day, hour, minute, and second. WeeWX converts > between them. If you want to understand timespans you have to understand > when exactly which of those two is used and when conversion takes place. > > $span uses weeutil.weeutil.archiveSpanSpan to get the timespan. It > receives a timestamp as a scalar value (seconds since 1970-01-01 00:00:00 > UTC). First it converts that timestamp to a tuple in *local* time. Then > it applies the deltas except the month delta using Python's > datetime.timedelta class. See the Python documentation how it works in > particular. For the month delta the method contains a special calculation. > After all that calculating the tuple is converted back to a scalar value in > seconds. The final timespan contains of both those scalar values in seconds > since 1970-01-01 00:00:00 UTC. The length of the timespan is simply the > difference of those values. It is the real amount of seconds. And this > amount of seconds is really 3600 seconds less or more if a daylight savings > time switch is within the timespan. To print the value the seconds are > converted to hours, minutes, and seconds. > > -- 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]. To view this discussion visit https://groups.google.com/d/msgid/weewx-user/7e731520-8bdd-454f-ac43-2aad15a895b6n%40googlegroups.com.
