I read the cookies in Chrome directly from the sqlite database file in the user profile (after shutting down Chrome). (The database file is located in Chrome profile folder in the file ./default/Cookies)
If I check the data types in sqlite the column says "INTEGER". In Java the number can be read as a long value.
The expiration seems to be something like milliseconds since epoch. But no matter how I convert the number, I get no fitting Date from it.
Example:
Cookie expiration Date from DevTools is: 2037-12-31T23:59:59.884Z
value in database is: 13790390399884192
long a = 13790390399884192l;
System.out.println(new java.sql.Date(a)); // 8970-01-28
System.out.println(new java.sql.Date(a/1000)); // 2407-01-01
Can anyone help me converting the col "expires_utc" to the fitting date?
While researching I found this post which coveres reading the cookie values from chromes sqlite database, just in case someone is looking for that stuff: Reading and Inserting Chrome Cookies Java