A LONG time ago, another user wrote that he was working on a library to read data from The Hit List directly
https://groups.google.com/d/msg/the-hit-list-users/arCPzjHaZeg/J6eatDiJWB4J
It doesn’t look like he ever released anything.
I was looking into reading THL’s library directly, to use with a geektool script, to avoid the overhead of applescript always having to lauch THL to read data in.
I’ve gotten part of the way, in finding tasks that are not complete yet
SELECT * FROM ZTASK where ZCOMPLETEDDATE is NULL ;
but I’m getting confused when I try to limit it to only tasks that are DUE now. If I look at the tasks schema I see ZDUEDATE is a timestamp
sqlite> .schema ztask
CREATE TABLE ZTASK ( Z_PK INTEGER PRIMARY KEY, Z_ENT INTEGER, Z_OPT INTEGER, ZARCHIVED INTEGER, ZPRIORITY INTEGER, ZNOTES INTEGER, ZPARENTLIST INTEGER, ZPARENTTASK INTEGER, ZRECURRENCE INTEGER, ZACTUALTIME FLOAT, ZCOMPLETEDDATE TIMESTAMP, ZCREATEDDATE TIMESTAMP, ZDISPLAYORDER FLOAT, ZDUEDATE TIMESTAMP, ZESTIMATEDTIME FLOAT, ZMODIFIEDDATE TIMESTAMP, ZSTARTDATE TIMESTAMP, ZCALENDARSTOREUID VARCHAR, ZNOTESUID VARCHAR, ZSTATUS VARCHAR, ZTITLE VARCHAR, ZUID VARCHAR, ZLOCALINFODICTIONARY BLOB );
Though when I try to query things, I can’t seem to figure out what kind of timestamp it is. It does not seem to be unixtime or juliantime.
For example
sqlite> SELECT * FROM ZTASK where ZCOMPLETEDDATE is NULL ;
...
ZDUEDATE = 363422378
...
which shows as a due date of 2012-07-07 from The Hit List’s UI but doesn’t seem to match
Unix time: 1341619200
Julian time: 2456115.5
Any other suggestions ?
It’s the number of seconds since January 1st 2001 GMT. I didn’t choose this value myself, it’s the way that Core Data and Cocoa saves dates.
For example, the value of 363422378 in your question becomes roughly 11.5 years:
363422378 seconds / 60 / 60 / 24 / 365 = 11.524048009