Edit a date value in plist from terminal I am trying to edit a date value in a plist to todays date.  I found a previous question on here relating to it, but i get an error every time.

Here is what i am using

defaults write com.test.name.plist TestAppFirstSeen $(date +"%Y-%m-%d %l:%M:%S +0000")


This is the error i get:

defaults[10761:276123] Unexpected argument 11:43:25; leaving defaults unchanged.


Any idea what i am doing wrong?
I'm surprised the original solution ever worked, but maybe the defaults command changed in recent versions. Try

defaults write com.test.name.plist TestAppFirstSeen "$(date +'%Y-%m-%d %l:%M:%S +0000')"


Also, %l gives you the hours between 1 and 12. If you want 1 to 24 use %H instead.