|
@@ -59,8 +59,13 @@ Sqlite3ChromiumCookieParser::~Sqlite3ChromiumCookieParser() {}
|
|
|
|
|
|
const char* Sqlite3ChromiumCookieParser::getQuery() const
|
|
|
{
|
|
|
- return "SELECT host_key, path, secure, expires_utc, name, value, "
|
|
|
- "last_access_utc"
|
|
|
+ // chrome's time is microsecond resolution, and its epoc is Jan 1
|
|
|
+ // 00:00:00 +0000 1601, so we have to convert it to second from UNIX
|
|
|
+ // epoc. 11644473600 is the second between chrome's epoc and UNIX
|
|
|
+ // epoc. e.g., date +%s -d 'Jan 1 00:00:00 +0000 1601'
|
|
|
+ return "SELECT host_key, path, secure, expires_utc / 1000000 - 11644473600 "
|
|
|
+ "as expires_utc, name, value, "
|
|
|
+ "last_access_utc / 1000000 - 11644473600 as last_access_utc"
|
|
|
" FROM cookies";
|
|
|
}
|
|
|
|