Concept & Design
Engineering
Testing
Grand Pooh-Bah
John C. "Hsoi" Daub
Hsoi Enterprises LLC
On 4 November 2003 I was contacted by Jeff Mao, Director of Technology, M.S.A.D. #60 (Maine School Administrative District #60, serving North Berwick, Berwick, and Lebanon, Maine). As a part of the Maine Learning Technology Initiative, the state had purchased 38,000 iBooks to put in the hands of 7th and 8th graders across the State of Maine. But it seems some of the students using the iBook's had been visiting web sites that they shouldn't have been visiting. In tracking down the (ab)use of the iBook's, the admins were checking the Safari history files and found a "lastVisitedDate" timestamp looking something like "89672909.2". Jeff searched around and thought this number was some sort of UUID and so he stumbled across my web site due to my Mac OS X utility UUID Generator.app. He asked if I knew how to undo that number to find out the time stamp. I replied saying the number was not a UUID, and that I had dug around some and discovered this number was actually a CFAbsoluteTime (see CFDate.h in your Mac OS X system headers). To confirm this I hacked up a quick command line tool that took the user input, converted it to a CFAbsoluteTime, converted that to a CFGregorianDate, and then spit out the results. I sent that to Jeff. The next day I was needing a distraction and so I hacked up a quick GUI-app thanx to Interface Builder and Cocoa to do the same thing (that was version 1.0).
It was actually smoother to perform the conversion via Cocoa since Safari is a Cocoa app using WebKit and thus WebHistory, which handles dates as NSCalendarDate's, thus the use of a double to preserve the time in the history file. I sent Jeff the 1.0 GUI app, and then decided since I had a free weekend to spruce up the GUI app a bit more just to round off the rough edges, then release everything to the public. The result of that (the app and source release) is the 1.1 version of the app.
If none of this makes sense to you, sorry. This is pretty much a geek/developer tool, and even then it's of limited use. All it does is take a number (technically a time/date stamp) in the form of a CFAbsoluteTime (or NSTimeInterval, same thing really) and then convert it into a more human-readable format. So "89672909.2" becomes "Tuesday 04 November 2003 03:08:29 PM".
It's a pretty small and simple application. You just launch it, ensure the converter window is displayed (select the New command from the File menu to display the window). Enter a valid CFAbsoluteTime (floating point value) into the text field, then click Convert. If the value entered into the text field can be converted to a human-readable time, it will be. If it cannot be converted, an error message will be displayed. The text of the conversion can be selected and copied.
This application was never meant to be anything polished nor robust. It was just a quick hack to solve a problem, and if it was useful to Mr. Mao, maybe it'll be useful to others. So I released it.
All versions of this application and source code (be it from the first command line version, to v1.0 to v1.1 or whatever versions and variants) are released into the public domain. I'm taking no copyright nor copyleft nor copy-due-up for that matter. I just don't want to have any legal matters with the thing (app, source), which should also absolve me of any real need to maintain or support the thing. :-) It'd be nice to keep my name and proper credit tied to the sources and the app, but I don't expect that since again it's all in the public domain. Share and enjoy.
Besides, if you Maine 7th and 8th graders don't like being "snooped" on, maybe you shouldn't be visiting questionable sites to begin with. Or at least if you do, remember what that "Reset Safari..." menu command is all about. :-)
+[NSCalendarDate dateWithTimeIntervalSinceReferenceDate:]
and I was unsure. But in doing
so I realized some things were perhaps out of date and/or could be done better. So I updated.
Written between 4 November and 7 November 2003 by John C. Daub. Application and source code released into the public domain. No rights reserved, no lefts reserved. Despite now being managed by Hsoi Enterprises LLC, the application and source code remains in the public domain.