9

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?

Src
  • 5,252
  • 5
  • 28
  • 56

1 Answers1

14

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:

  1. Devide the actual timestamp (in my case it's expires_utc column in cookies table) by 1000000 // And someone should explain my why.
  2. Subtract 11644473600
  3. DONE! Now you got UNIX timestamp.
Src
  • 5,252
  • 5
  • 28
  • 56