mirror of
https://github.com/aria2/aria2.git
synced 2025-02-26 08:22:11 +00:00
Adjust chromium cookie time
This commit is contained in:
parent
3443349fc3
commit
6976ffed9e
@ -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";
|
||||
}
|
||||
|
||||
|
Binary file not shown.
Loading…
Reference in New Issue
Block a user