Recall, the logger will contain two records with identical local time
stamps.

Weewx does not do the conversion from local time to UTC. The operating
system does. Effectively, weewx asks the OS, please convert the time 0230
6-Nov-2016 local time to UTC. That's no problem most of the year, but
during that one hour in the fall when DST ends, there are *two* such local
times. The OS doesn't know which one you want, so it punts and gives you
the DST conversion, even though that may not be what's called for.

So, both records end up getting converted to the same UTC time.

Now, this could be prevented by adding a lot of complexity to weewx: Have I
already seen a local time stamp with time 0230 6-Nov-2016? If so, then the
second record must be in standard time, not DST. But, such a check would
cause valid records to be rejected the rest of the year when weewx does a
"catchup": you only want the check to be done during the one hour DST
transition. So, that means weewx must become DST aware. That would require
more complexity, plus it would require that the DST-aware package pytz (or
equivalent) be installed.

In the end, I decided all these checks, plus the requirement to download
another package, wasn't worth it.

If someone can come up with a better solution, I'm all ears. Send me a PR.

-tk


On Fri, Oct 28, 2016 at 10:24 PM, Robin <robin.sand...@otenet.gr> wrote:

> Tom,
>
> This just compounds my confusion. How does WeeWX get from Davis local time
> to UTC? Can't WeeWX take DST into account during the conversion?
>
> On Friday, 28 October 2016 18:43:03 UTC+3, Tom Keffer wrote:
>>
>> On Fri, Oct 28, 2016 at 8:36 AM, Robin <robin....@otenet.gr> wrote:
>>
>>> That bit I understand Tom. The bit that confuses me is, I thought that
>>> WeeWX stored the data using UTC.
>>>
>>>
>> ​It does. But, first it has to get the data off the logger.
>>
>> ​One thing you could try is to set record_generation=software for the
>> transition night. Then set it back to hardware in the morning. I haven't
>> tried this, but it might work.
>>
>> -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 weewx-user+unsubscr...@googlegroups.com.
> 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 weewx-user+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to