unix numeric value ...
 
Notifications
Clear all

unix numeric value & dcode

5 Posts
4 Users
0 Reactions
1,097 Views
(@si2013)
Eminent Member
Joined: 12 years ago
Posts: 36
Topic starter  

Hi everyone !

First post on here since I've been lurking! I've been messing around with a piece of software called DCode and I basically copied out a value from firefox's downloads.sqlite file and used DCode to convert the 'unix numeric value' into a readable format.

Now, my question is, what exactly is 'unix numeric value' and why is firefox recording downloads in that format?

Sorry if this is a silly question, but I think it would be more silly if I didn't find out!

Thanks all,
Simon


   
Quote
jhup
 jhup
(@jhup)
Noble Member
Joined: 16 years ago
Posts: 1442
 

http//en.wikipedia.org/wiki/Unix_time

Why? One answer is space. To store a string of YYYY/MM/DD HHMMSS we would need at least 14 bytes (excluding separators). With Unix epoch time, we only need 4 bytes. That is less than 29% of the original storage space!

An other is calculation. It is much simpler to use seconds to represent time to add, subtract, divide, multiply then convert it to human readable. If we stored it in human readable, it would require conversion at least twice - convert to seconds, then perform math, convert back…


   
ReplyQuote
jaclaz
(@jaclaz)
Illustrious Member
Joined: 18 years ago
Posts: 5133
 

With Unix epoch time, we only need 4 bytes. That is less than 29% of the original storage space!

See you in two thousand and thirty-eight, alligate wink
http//en.wikipedia.org/wiki/Year_2038_problem

jaclaz


   
ReplyQuote
(@Anonymous 6593)
Guest
Joined: 17 years ago
Posts: 1158
 

Now, my question is, what exactly is 'unix numeric value' and why is firefox recording downloads in that format?

The reason why Firefox has adopted a Unix time representation is probably one of expediency there's a lot of well-tested open-source code out there for handling and interpreting Unix timestamps that can be reused.

If you choose the other path, and invent your own time format, you will have to implement all that yourself. As well as test it.


   
ReplyQuote
(@si2013)
Eminent Member
Joined: 12 years ago
Posts: 36
Topic starter  

thanks for the replies, much appreciated


   
ReplyQuote
Share: