Somehow the clock on your weather station or your RPi got a couple days
ahead of reality, perhaps when you rebooted. Do you have a real-time clock?
To figure out what happened you would have to go through the historical RPi
system logs from back when you rebooted.

In any case, no matter what the cause, the fix is the same: delete the "in
the future" database records and rebuild the daily summaries. Here's the
steps (NOT TESTED):

1. Stop weewx

2. Make a backup copy of your database.

sudo cp /var/lib/weewx/weewx.sdb /var/tmp/weewx.sdb.backup


3. Figure out what the last good record is in your database. Let's say it
was 0100 on 25-Dec-2017 CST (UTC-6). That would be 1514181600 unix epoch
time. This website <https://www.epochconverter.com/> can help.

4. Make sure the tool sqlite3 is on your system

apt-get install sqlite3


5. Use it to delete the future records

sudo sqlite /var/lib/weewx/weewx.sdb
sqlite> DELETE FROM archive WHERE dateTime > 1514181600;
sqlite> .quit


6. Rebuild the daily summaries

sudo wee_database --rebuild-daily --from 2017-12-25


7. Restart weewx.

Let us know how it goes.

-tk


On Tue, Dec 26, 2017 at 1:01 PM, Mike Dame <[email protected]> wrote:

> I have attached two cycles, the log looks normal to me (but not an expert).
> Without doing a sql query to look at the database, it weekly temp graph
> looks like it is adding data on the correct date, but the current graph is
> plotting data that was dated wrong....
>
> Mike
>
>
> On Monday, December 25, 2017 at 8:53:02 PM UTC-6, Mike Dame wrote:
>>
>> Last night I rebooted my raspberry running that is running "weewx
>> v3.8.0".  And the report are dated two days ahead, so today is the 25th of
>> Dec, reported that the temps are from 27th of Dec. I have double checked
>> the system clock is correct on the raspberry and the time on the "WMR200a"
>> is set correct, within minute of the raspberry.  notice the date stamp on
>> the database check below.
>>
>> The only error that I can see in the messages log is "wmr200: MainThread:
>> W Clock time unsynchronized", I did not really get any hits that would give
>> me a hint if this is the error or not.
>>
>> pi@raspberrypi:~ $ sudo  wee_database --check
>> Using configuration file /etc/weewx/weewx.conf
>> Using database binding 'wx_binding', which is bound to database
>> 'archive_sqlite'
>> Checking daily summary tables version...
>> Daily summary tables are at version 1.0
>> Recommend running --update to recalculate interval weightings.
>> Daily summary tables version check completed in 0.02 seconds.
>> Preparing Null String Check, this may take awhile...
>> *Checking record: 739537; Timestamp: 2017-12-27 04:31:37 CST (1514370697)*
>> No null strings found.
>> Completed Null String Check in 70.77 seconds.
>> pi@raspberrypi:~ $ date
>> *Mon 25 Dec 20:42:46 CST 2017*
>> pi@raspberrypi:~ $
>>
>> Anybody got some ideas?
>>
>> Regards,
>> Mike
>>
> --
> 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].
> 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 [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to