I made a change to the script which should eliminate the need to set your system time to 24hr format (even though that's what all the kool kids do)
Here it is:
display dialog "Aperture will Start." & return & return & "Select image(s), press Continue when ready" buttons {"Continue", "Stop"} default button 1
set the user_choice to the button returned of the result
if the user_choice is "Stop" then
tellmetoquit
end if
tell application "Aperture"
activate
set imageSel to (get selection)
if imageSel is {} then
error "Please select an image."
else
repeat with i from 1 to count of imageSel
tell item i of imageSel
set imageDate to value of EXIF tag "ImageDate"
set hrs to hours of imageDate
if hrs < 10 then
set hrs to "0" & hrs
end if
set mins to minutes of imageDate
if mins < 10 then
set mins to "0" & mins
end if
set secs to seconds of imageDate
if secs < 10 then
set secs to "0" & secs
end if
set timeString to (hrs & ":" & mins & ":" & secs) as rich text
display dialog "Time is: " & timeString
--set s to time string of imageDate
makenewcustom tagwith properties {name:"Capture Time", value:timeString}
end tell
end repeat
end if
end tell
It dismantles the time in the EXIF data and puts it back together again in 24 hr format. At least that is what I think it will do. As I said I have my system set to 24 hour format and my Canon only does 24 hour in the EXIF data so I can't really give ti a good test.
Give it a shot and if it works you won't need to change your system time format.