Thanks, that makes sense. I just checked the database again and the data 
are there so I must have been looking in the wrong place, doh!

When it comes to the clocks going back again in October is the same thing 
likely to happen again? If so I guess the same fix will work again, or is 
there something I should do to prevent it?

On Monday, 29 March 2021 at 00:56:09 UTC+1 [email protected] wrote:

> On Sun, Mar 28, 2021 at 2:36 PM Jon B <[email protected]> wrote:
>
>> Ah, thanks, that's done the trick! The data from when the clock changed 
>> now appear on my page. Out of interest - while the logs show that the 
>> records were added to the database file, I've just had a look and there 
>> seems to be a gap from the clock change until I just got it going again, so 
>> where is the data coming from/where has it been added? Also, there's no 
>> hour gap on the graphs for my station, which I thought there would be 
>> (there's data every minute between 01:00 and 02:00)?
>>
>  
> WeeWX uses time.mktime() 
> <https://docs.python.org/3/library/time.html#time.mktime> to convert from 
> local time to UTC. This function takes a "time tuple", one of whose fields 
> is tm_isdst. You're supposed to fill this field out with whether DST is 
> active or not but, of course, we don't know because the Vantage won't tell 
> us. So, we use "-1" which indicates that the system should figure it out. 
> Usually it gets the right answer. Here's what it looks like during the DST 
> transition 14-Mar-2021 here in the USA:
>
> >>> from time import mktime
> >>> mktime((2021,3,14,1,0,0,0,0,-1))
> 1615712400.0
> >>> mktime((2021,3,14,2,0,0,0,0,-1))
> 1615716000.0
> >>> mktime((2021,3,14,3,0,0,0,0,-1))
> 1615716000.0
> >>> mktime((2021,3,14,3,1,0,0,0,-1))
> 1615716060.0
>
> You can see that both 0200 and 0300 give UTC time 261571600. No gap.
>
> You didn't say how large a gap there was in your database. There shouldn't 
> be one because, although local time is discontinuous, as we have seen, UTC 
> is not. Perhaps the logger lost a record when it became corrupted? 
>
> This is also why there is no hour gap in the plots --- time didn't stop or 
> jump ahead, it just changed how it was labelled.. Indeed, if you look 
> closely, you'll see that the vertical tick marks between midnight and 3am 
> are a little closer together than they are between 3 and 6. 
>
> Hope this helps.
>
> -tk
>
>

-- 
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 on the web visit 
https://groups.google.com/d/msgid/weewx-user/fd1117b9-615a-45dd-8da1-02531ff73ec6n%40googlegroups.com.

Reply via email to