Seamonkey and Timestamps

Started by MichaelNyby, April 26, 2022, 05:33:13 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

MichaelNyby

Looking in the cookie.sqlite file and seeing a timestamp like this one:

1666426270 <<< Created today, by the way. It is under the "expiry" column.

And can't seem to find any source on the Net using the Google search tool that informs me in language I can understand how to convert that to a 'regular' date I can understand.

Just so you know I tried, and this is the second day, here are the two latest sites I checked and it is all quite incomprehensible to me.

https://www.mssqltips.com/sqlservertip/2655/format-sql-server-dates-with-format-function/

https://codingsight.com/sql-convert-datetime-to-date-format/

Of course, it doesn't help that I ain't the sharpest tool in the shed, so have patience with me, please.

Thank you.

EDIT: Here are the other two.

"lastAccessed" = 1650938280547000
"creationTime" = 1650874268994001

MichaelNyby

#1
My goodness, 650 something views in just 72 hours. You folks are allowing a lot of bots on your site, aren't you? Unfortunately, though, I don't think a bot is going to answer me, but someday that is going to be possible. But that's another thread, right?

And it should be obvious from the topic title, but in case it isn't, was missed, or requires confirmation, I am referring to the Seamonkey cookie folder:

... AppData\Roaming\Mozilla\SeaMonkey\Profiles\xxxxxpfr.default\cookies.sqlite


nil

That number is an "epoch" value, a timestamp common in Unix-like operating systems that represents a number of seconds (or other denominations, such as milliseconds or microseconds) from a set time in the past, typically since the first second of January 1, 1970.

https://www.computerhope.com/jargon/e/epoch.htm

You can use an epoch converter to change it to a date:

https://www.epochconverter.com/

For example 1666426270 (measured in seconds since Jan 1, 1970)= Oct. 22, 2022 . My guess is this was set in a cookie on April 22 to represent that the cookie should expire in six months.

Epoch time values can also be in microseconds, such as your longer examples:

"lastAccessed" = 1650938280547000 (measured in microseconds since 1/1/70) = April 26, 2022 1:58:00.547 AM

"creationTime" = 1650874268994001 (measured in microseconds since 1/1/70) = April 25, 2022 8:11:08.994 AM
Do not communicate by sharing memory; instead, share memory by communicating.

--Effective Go

MichaelNyby

Thank you, nil, for the explanation. Afraid, though, I'll have to study your post in detail a few hours from now. May get back to you if any questions arise.

Just a quick look has me giving thought to that idea of "microseconds". I mean, I can certainly understand that microseconds are important in programming, but trying to imagine how a microsecond could be physically enacted ... I guess typing could be one example, no? I hit the "A" key and in a microsecond it appears on my monitor? Am I close?

Strange, I can fully comprehend the light from the Sun in 8 minutes and 20 seconds, but I cannot "fully" comprehend a microsecond. Sure gives one pause for thought.

Anyway, I intended to simply post a thank you and now I've wandered off into weird time frame thoughts.