Alright I was looking at this in python but I just like ruby better. What I’m trying to do is get a date and time from this number – 12988822998637849 – which is the number of microseconds since January 1, 1601 UTC. This is how Chrome stores it’s timestamps and i’ve seen a number of methods to do this in python, but I am just more comfortable with ruby and I have no idea on how to even start going about doing this. (My Google-Fu didn’t help me this time)
Note this example number is from a few days ago. I’ll take any help I can get. Thank you!
Alright I was looking at this in python but I just like ruby better.
Share
look at Time.at.
A Windows file time is “a 64-bit value that represents the number of 100-nanosecond intervals that have elapsed since 12:00 midnight, January 1, 1601 A.D. (C.E.) Coordinated Universal Time (UTC).” Ref.
In contrast, Ruby stores times like Unix: “Time is stored internally as the number of seconds and microseconds since the epoch, January 1, 1970 00:00 UTC” Ref.