Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing timestamps #19

Open
Scimmia22 opened this issue Mar 6, 2019 · 5 comments
Open

Missing timestamps #19

Scimmia22 opened this issue Mar 6, 2019 · 5 comments

Comments

@Scimmia22
Copy link

All of my timestamps are showing as [None]. I haven't pinned it down, but I would guess it has to do with the database changes introduced by Quassel 0.13

@fish-face
Copy link
Owner

This might take a while to fix as I don't have a 0.13 core to hand (PRs welcome ;)) and will need to ensure backwards compatibility.

@Scimmia22
Copy link
Author

I'll look into the database schema changes when I have a chance, maybe it won't be too bad.

@Scimmia22
Copy link
Author

Looks like the relevant change is here:
quassel/quassel@56f686f

Just switching to storing in milliseconds. Shouldn't be bad. Now to figure out quasselgrep. :)

@curVV
Copy link

curVV commented Apr 5, 2019

Change line 139 in query.py:
from:

columns.append("datetime(backlog.time, 'unixepoch') as time")

to:

columns.append("datetime(backlog.time / 1000, 'unixepoch') as time")

@digitalcircuit
Copy link

Ack, I forgot to offer a heads up here when making the change. Apologies for the hassle!

Yes, dividing backlog.time by 1000 as suggested by curVV should be sufficient. However, pre-0.13 databases will then be incorrect.

Two possible options:

  1. Unconditionally divide, drop support for SQLite Quassel databases older than 0.13
    • Can add a comment to this effect so folks staying on older versions know what to revert
    • Simpler
  2. Parse the database schema_version to determine whether to use the old (seconds) or new (milliseconds ÷ 1000) approach
    • Works for 0.12.5 and older, and 0.13
    • More to maintain

zkrx added a commit to zkrx/quasselgrep that referenced this issue Dec 31, 2020
Since sqlite3 schemaversion 31, timestamps are in milliseconds (see 56f686f7 in quassel).
As a result, timestamps were broken on sqlite3 databases >= 31. This fixes issue fish-face#19.
zkrx added a commit to zkrx/quasselgrep that referenced this issue Dec 31, 2020
Since sqlite3 schemaversion 31, timestamps are in milliseconds (see 56f686f7 in quassel).
As a result, timestamps were broken on sqlite3 databases >= 31. This fixes issue fish-face#19.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants