Home
Options

Unexpected values from SQLite database.

I'm getting some unexpected values from a SQLite database in LINQPad.

I'm reading a copy of a Firefox cookies file. These are stored in SQLite. (For anybody wanting to replicate, Firefox takes exclusive control of the file so a copy is needed and browsing may not show the file.)

Here's an example of what I see in LINQPad. This is three columns of integers which are effectively Unix Timestamps. The first to 1 second resolution the next two to microsecond resolution.
1446242115 284529888 -1530874360
1446243091 -1748685736 -1651291313
1446243091 -1748685736 -1651291312
1577144990 -1577438320 -470357688
1446278991 1102931184 -111509688
1583248735 953788552 -1315902648
1983248677 953788552 -1314620648
1446320738 953788552 -1313959648
1446322838 1491177560 785927352
1446322838 1491177560 781068353
1698615084 -1449350912 736989056
The second and third rows aren't right.

Here's the same data as seen in SQLite Browser:
1446242115,1429137767372000,1383128262293000
1446243091,1431901693095000,1383171091549007
1446243091,1431901693095000,1383171091549008
1577144990,1412162194650000,1383206632221000
1446278991,1431818645366000,1383206991069000
1583248735,1428562911013000,1383248736349000
1983248677,1428562911013000,1383248737631000
1446320738,1428562911013000,1383248738292000
1446322838,1431900637991000,1383250838179000
1446322838,1431900637991000,1383250833320001
1698615084,1430961394592000,1383255084208000
It appears that the 16 digit "long form timestamps" are misinterpreted.

Details:
Data: SQLite 3.7.17 as used for Firefox cookies (38.0.1)
LINQPad: 4.55.03 (Prem) with IQ driver 2.1.1.
SQLite Browser: 3.6.0, which supports SQLite up to 3.8.9)
Host: Win 8.1, 64 bit, patched up to date.

My process was very simple. Grab file, create new connection, select IQ driver, pick SQLite, enter file path, let LINQPad make the connection.

Is there something else I need to do to make this work?

If not what is happening?

Comments

Sign In or Register to comment.