Thought we finally had it till I tried 21:01 and got 9:01 AM.
Try this, left out one minor little line of script. (set h to h-12)
FYI, I just installed SN on this laptop and got the same results as Robert. It's not his mac.
ES
set wakeTime to "21:01"
set oldDelims to AppleScript's text item delimiters
set AppleScript's text item delimiters to {":", " "}
set {wakeHour, wakeMin} to text items of wakeTime
set AppleScript's text item delimiters to oldDelims
set h to wakeHour as integer
if h < 13 then
set amOrPm to " am"
else
set amOrPm to " pm"
set h to h - 12
end if
set m to wakeMin as integer
if m < 10 then set m to "0" & m
set wakeTime to (h & ":" & m & amOrPm)
set WakeUpTime to short date string of (current date)
set WakeUpTime to date (WakeUpTime & space & wakeTime)
(time string of WakeUpTime)