View Single Post
Old 06-08-2018, 09:10 AM   #460
davidfor
Grand Sorcerer
davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.
 
Posts: 24,905
Karma: 47303824
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
Quote:
Originally Posted by jackie_w View Post
In case it gives any insight, here is a screenshot of part of the Kobo database's content table. The only 4 books on the device are the top 4 lines. As you can see the ___SyncTime column has the same value for all 4. Shouldn't that column be in timestamp format???
Well, it looks like a timestamp format to me, just not one I'd use anywhere. And a really frustrating one that seems to be popular in Linux log files. In this case, unfortunately, SQLite doesn't have a real timestamp data type, so timestamps are usually stored as strings. The alternative would probably be epoch timestamps which are just as annoying as this format.

And I'm pretty sure that timestamp is the problem. I installed 4.8.11090 on my Glo. Everything seemed to be OK including the books displayed on the home screen.

After seeing these timestamps, I added a couple of books. And they appeared as the first two book. Opening other or these didn't change anything. When I looked the database, I saw the same sort of timestamps. So, I fixed them to be the same format as the other timestamps, and everything was OK.

What I would say is that a change has been made that is writing the timestamps in this format. But, the reading code is not handling the format properly. I don't know if this means that there is an error happening that returns a bad value, or if the conversion back is just giving a wrong timestamp. If it is the latter, it might fix itself after a few days when the current time catches up to whatever the timestamps is being converted to. But, then it will fail again when the next time books are added to the device.

Until Kobo fixes this, a workaround is to use calibre and my Kobo Utilities plugin. The "Update metadata in device library" can set the date added to one of the dates in the library. This will set the __SyncTime in the correct format.

Another way would be to write a database trigger to use the correct format when the books are first added. It shouldn't be to hard, so I'll leave it as an exercise for someone
davidfor is offline   Reply With Quote