Then adapt as necessary. Use from_unixtime() instead of datetime() in the select statement.
On Fri, Jan 8, 2021 at 11:49 AM Arend <arendheng...@gmail.com> wrote: > Hello Tom, > > I am using MySQL database. > > Arend > > Op vrijdag 8 januari 2021 om 20:18:20 UTC+1 schreef tke...@gmail.com: > >> Thanks. Not sure what is happening, but let's take a look at your >> database. I'm assuming you are using SQLite, and that you used a package >> installer. You may have to install the tool sqlite3 first >> >> sudo apt-get install sqlite3 >> >> Then >> >> *sqlite3 /var/lib/weewx/weewx.sdb* >> sqlite> *select mintime, datetime(dateTime,'unixepoch','localtime'), min >> from archive_day_outTemp order by min asc, mintime asc limit 20;* >> sqlite> *.quit* >> >> Let me know what you get. >> >> -tk >> >> >> >> On Fri, Jan 8, 2021 at 10:01 AM Arend <arendh...@gmail.com> wrote: >> >>> After upgrading from WeeWX 4.1.1 to 4.3.0 Invalid dates started to show >>> up for mintime. >>> >>> In this Belchertown thread the issue is reported by multiple users. >>> >>> https://github.com/poblabs/weewx-belchertown/issues/517 >>> >>> After replacing the SQL optimizations with the previous "mintime" SQL >>> strings from WeeWX 4.1.1 the problem was solved. >>> >>> Screenshot using optimized (4.3.0) SQL showing invalid dates using >>> "mintime": >>> >>> [image: weewx_belchertown_records_invalid_dates.png] >>> >>> Replacing the relevant "mintime" code in xtypes.py with SQL strings from >>> 4.1.1: >>> >>> [image: agg_sql_dict.png] >>> [image: daily_sql_dict.png] >>> >>> Now the previous invalid dates are displayed correctly: >>> >>> [image: Records Belchertown na herstel SQL strings.png] >>> >>> Haven't tested other SQL optimizations. >>> >>> -- >>> 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/3c48aa67-0850-4f19-af9e-a08527ef8b1cn%40googlegroups.com >>> <https://groups.google.com/d/msgid/weewx-user/3c48aa67-0850-4f19-af9e-a08527ef8b1cn%40googlegroups.com?utm_medium=email&utm_source=footer> >>> . >>> >> -- > 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/d4d920a7-1bd9-4fa7-91d5-d187a6cda3cfn%40googlegroups.com > <https://groups.google.com/d/msgid/weewx-user/d4d920a7-1bd9-4fa7-91d5-d187a6cda3cfn%40googlegroups.com?utm_medium=email&utm_source=footer> > . > -- 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/CAPq0zECuEOk%2Bn7r-wT5wtNB5QxQ-QeU5YSnu6m7XZuDSCYpLJw%40mail.gmail.com.