I would like to add the release date to podcasts that I've imported into iTunes, but my applescript is returning an error about the date object.
tell application "iTunes"
set theSelection to selection
if theSelection is not {} and (length of theSelection) is 1 then
set theTrack to item 1 of theSelection
log release date of theTrack as text
set release date of theTrack to date ("2011-12-23T08:00:00Z" as string)
refresh theTrack
end if
end tell
The line set release date of theTrack to date ("2011-12-23T08:00:00Z" as string) gives me this error
error "Invalid date and time date 2011-12-23T08:00:00Z." number -30720
How do I make the string 2011-12-23T08:00:00Z into a date object that applescript won't complain about?