问题
I created DB from google chrome's Cookies file and one of the columns in the cookies
table is expires_utc
. The format of the column is like - 13169399213145330, which is more like unix time. But when i'm trying to use unix time converter, it gives wrong values.
So, what format is that and how i can convert it to actually unix time?
回答1:
So, after long researches on this topic, here is the solution:
- Chrome's cookies timestap's epoch starts 1601-01-01T00:00:00Z (Why? Because.)
So, it's 11644473600 seconds before the UNIX epoch. To convert chrome's timestamp to UNIX, you need to:
- Devide the actual timestamp (in my case it's
expires_utc
column incookies
table) by 1000000 // And someone should explain my why. - Subtract 11644473600
- DONE! Now you got UNIX timestamp.
来源:https://stackoverflow.com/questions/43518199/cookies-expiration-time-format