heikkilevanto / beertracker

Simple script to track the beers I drink
GNU General Public License v2.0
2 stars 1 forks source link

Strange future graph #153

Closed heikkilevanto closed 3 years ago

heikkilevanto commented 3 years ago

Note the two + marks on 25-Oct. Screenshot_20201021_005230

The plot file ends with 2020-10-20 7.59552042160738 0 3.89735889630942 3.62742330133635 NaN 2020-10-21 0 0 3.6442808898581 3.62742330133635 NaN NaN 2020-10-22 0 0 NaN 3.62742330133635 NaN 3.39120288340678 2020-10-23 0 0 NaN 2.58648597779033 NaN 3.1513849136038 2020-10-24 0 0 NaN 2.58648597779033 NaN 2.91156694380083 2020-10-25 0 0 NaN 1.56785243741766 NaN 2.68886920176276 2020-10-25 0 0 NaN 1.08507434594391 NaN 2.48369300198386 2020-10-26 0 0 NaN NaN NaN 2.29877182620811 2020-10-27 0 0 NaN NaN NaN 2.11385065043236

heikkilevanto commented 3 years ago

This happened not too far past midnight, maybe that has something to do with it?

heikkilevanto commented 3 years ago

Yes, the next forenoon the problem had fixed itself, without any additional data entries. Need to keep an eye on it around midnight to confirm or refute this theory.

heikkilevanto commented 3 years ago

One theory is that it could have happened just around midnight, so that midnight fell when the graph was looping. If that is the case, I can live with it, as simple refresh will fix the one bad entry in the graph. But I seem to recall it was about 00:10 when I noticed the problem... Not sure when I actually run the graph.

Added some debug printing in the code, in case I can redo it. They are in html comments, out of the way for normal use.

heikkilevanto commented 3 years ago

Maybe I should remember the current time the first time I make a timestamp, and refer to that every time thereafter.

heikkilevanto commented 3 years ago

Yes, the same thing happened tonight, around midnight. And 2 minutes past midnight. -1 '2020-10-23' '2020-10-23 00:01:30 (1603404090)' 3.19799797071161 2.69376999811782 -2 '2020-10-24' '2020-10-24 00:01:30 (1603490490)' 2.95645359138613 2.69376999811782 -3 '2020-10-25' '2020-10-25 00:01:30 (1603576890)' 2.73202943982554 1.67513645774515 -4 '2020-10-25' '2020-10-25 23:01:30 (1603663290)' 2.52512683052413 1.19235836627141 -5 '2020-10-26' '2020-10-26 23:01:30 (1603749690)' 2.33847924522587 0.107284020327499 -6 '2020-10-27' '2020-10-27 23:01:30 (1603836090)' 2.15183165992761 NaN -7 '2020-10-28' '2020-10-28 23:01:30 (1603922490)' 1.96518407462935 NaN Again, on the 25th. And indeed the time changes from 00:01:30 to 23:01:30. That is when we turn our clocks to "normal" time, from "summer" time.

heikkilevanto commented 3 years ago

I could do a lot of trickery to see if the time is close to midnight, move it a few hours earlier, or just specify high noon for all date stamps.

But this happens on two dates every year, so I don't think I can be bothered.