On Thursday, 25 August 2022 at 23:54:11 UTC+10 kurand wrote:

> Thanks for confirming what I understood from weeimport.py and 
> weathercatimport.py.
>
> I am using "derived' for the import because I originally configured 
> WeatherCat with Adaptive interval set true so I have data logged at 
> varying  rates from 1 minute all the way up to 30+ minute intervals. 
>
> I think in this case, weathercatimport.py needs to use timezone aware 
> date-time objects during its construction of dateTime else data will become 
> misplaced and DST changes will fail as noted. Once this is accomplished, 
> then something needs to get added to deal with the apparent bug in 
> WeatherCat where transitioning from standard time to daylight saving time 
> in spring causes it to skip an extra hour forward sometimes. It looks to me 
> like this can all be isolated in weathercatimport.py's getRawData function. 
>
> I'm curious to know if anyone else has run into this problem, or if it is 
> something specific to my WeatherCat data. Or perhaps WeatherCat import has 
> been used in anger. 
>

 Yes 'aware' datetime objects would be preferred; however, their use raises 
a number of other issues. Programatically, there is the potential for 
conflict with the rest of the WeeWX code base which uses naive datetime 
objects only. Also, we try to avoid external dependencies unless absolutely 
necessary so hence we need to work within the standard libraries shipped 
with python. Then there is the issue of daylight saving cutover times often 
being politically driven, so who knows what impact that may have - we may 
be solving one issue only to create others.

That being said there are two issues at play here. Firstly, an out of 
date-time order record caused the entire import to abort. The reasoning for 
this behaviour was the assumption that a randomly ordered batch of records 
was provided for import, this is probably too onerous and we could (should 
be able to) back this off to simply ignore the miscreant record. This 
should be a simple change. Secondly, the issue of daylight saving. I am 
happy to have a look at wee_import to see what can be done to support 
daylight saving using the existing included python libraries. To this end 
some relevant WeatherCat data files would help, would you be able to 
provide example WeatherCat files covering both the start and end of 
daylight saving? If you want you can reply privately to this post and 
include them. thanks.

Gary

-- 
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 on the web visit 
https://groups.google.com/d/msgid/weewx-user/b4a8ec79-e9f0-4ea4-a28f-5f3d1a2d3c5fn%40googlegroups.com.

Reply via email to