Replying on-list for the archives :-)

On Apr 18, 2004, at 5:04 PM, Jim Witte wrote:

I assume the information displayed by the History potion of the bookmark manager is kept by the Mozilla trunk code, and not by the Camino specific part. Does the history store anything more than just the URL, page name, and day - specifically, does it store the time of day it was accessed? This would be useful in some situations (you looking for something you know you access at a particular time, or around the time you access another thing you can do a search for).

AIUI, it's stored as a ctime. This means the time's already there. To have a look, grab this script:
http://www.jwz.org/hacks/mork.pl
and run it on a copy of your history.dat. The most useful representation I got was:


% perl mork.pl --html myhist.dat >myhist.html
% open myhist.html


Although if this isn't kept by the trunk code, it would require a change to the trunk, and I'd think increase the size of the history file by a lot, unless some clever time-encoding scheme were used - perhaps minutes since last page view if less than 255 - that keeps it down to a byte, or a full date-stamp if greater than that - with the first byte's high/low bit (not used in the 1-255 minute encoding, and made to not be used in the full date encoding) to keep track of which scheme was used. This of course would mean that the full date history would have to be rebuilt each time. And there may be better ways to store dates out there.. (If anyone knows anything particularly good, email me? I'm interested academically as well as for the possibility of ways to put it into Camino)


It's the number of seconds elapsed since the beginning of 01 Jan 1970. Not necessarily the best way for every application, but it's quite compact and does the job here. On OS X (and most if not all all modern UNIXes, I think) it's a 4 byte long integer.


HTH,

Geoff

_______________________________________________
Camino mailing list
[EMAIL PROTECTED]
http://mozdev.org/mailman/listinfo/camino

Reply via email to