stopping writes of clearly bad timestamp to weewx.sdb

35 views
Skip to first unread message

vince

unread,
Sep 14, 2020, 7:45:07 PM9/14/20
to weewx-user
Over in the WeatherFlow forums a guy had an interesting problem where occasionally he has timestamps in his weewx.sdb of 300 or so (ie, 12:05AM 1/1/1970 GMT).   My 'guess' is his host took a reboot and weewx fired up before the host had accurate date+time.

Is there an easy way to block writes to the db where date+time on the runtime host is obviously crazy wrong ?

Perhaps any time before y2k or some similarly 'not 1970 but not yesterday' line in the sand ?


John Kline

unread,
Sep 14, 2020, 9:10:53 PM9/14/20
to weewx...@googlegroups.com
It might be best to not write an archive record less than or equal to the largest dateTime value in the archive table.  Sure, there may be an erroneous later row, but that is an issue that should be addressed anyway (rather than ignored).  WeeWX already gets the latest at startup (in order to catchup for drivers that support it).

On Sep 14, 2020, at 4:45 PM, vince <vince...@gmail.com> wrote:


Over in the WeatherFlow forums a guy had an interesting problem where occasionally he has timestamps in his weewx.sdb of 300 or so (ie, 12:05AM 1/1/1970 GMT).   My 'guess' is his host took a reboot and weewx fired up before the host had accurate date+time.

Is there an easy way to block writes to the db where date+time on the runtime host is obviously crazy wrong ?

Perhaps any time before y2k or some similarly 'not 1970 but not yesterday' line in the sand ?


--
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+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/a7b16a6f-30f3-4c39-8f50-d2729023772do%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages