I love it when a plan comes together!
Annoture is now successfully transferring annotations from iView to Aperture and back. I completed the last piece, Aperture to iView, just a few minutes ago, and it’s great to see things running smoothly.
There’s just a few more pieces to finish before I can wrap up this application and release it into the wild. I can finally see the end of the tunnel from here!
One issue which will be difficult to resolve happens when copying annotations from Aperture back to iView. Since Aperture lets you have multiple versions of the same image, which one do you pick? The application currently selects one of the master versions to transfer on a semi-random basis. There’s no guarantee that it’s the one with the most up-to-date annotations. In the SQLite database, there is a
ZEXPORTMETADATACHANGEDATE field, but the format of the date is strange. Sample values include: 155143329.224529, 155139934.77349, 155139919.663023, and 155139928.835527. Anyone know how to decipher this? I could add an additional query to select the version that was updated the last.
8 thoughts on “Annoture Feature Complete!”
That looks like an NSDate — the first date (155143329.224529) calculates to 2005-12-01 10:22:09 -0500. Check out NSDate’s +dateWithTimeIntervalSinceReferenceDate: . Don’t know what the Applescript Studio mechanisms for getting at that are.
Maybe it’s the number of seconds since Jan 1, 2001.
I think Eric Cheng is right.
I think near 400.000.000 seconds since Jan 1, 2001 to today.
I think not…
It’s a variant of a unix timestamp. If you take the date and pass it to: date -r you get the date -31 years, exactly. I’m trying to figure this out too. So far the best I can figure is that it’s a unix timestamp – ((365 * 24 * 60 * 60) + (8 * 60 * 60)) the extra 8 days is for the 8 leap days in those 31 years.
I’m looking for a better explanation, so if you have one, please post.
OK, I now think it is an NSdate, but I’m not sure how to translate it to a unix timestamp to other usable date using bach script, PHP or applescript. Any ideas?
Finally found the way to convert the timestamp into something AppleScript can handle:
set theDate to call method "dateWithTimeIntervalSinceReferenceDate:" of class "NSDate" with parameter (theTimestamp as real)
where theTimestamp is the value for the timestamp field in SQLite3.