I am having issue getting a dialog box to display time. I am using date +"%T" as the means to show the time but when I use it in a message dialog it just shows it verbose as date +"%T" rather then 07:41:40 I have tried assigning the value to a variable and calling it in the dialog box script but still I can not get it to work. I am wondering if my response dialog box needs to be a different format or if my parentheses usage is screwy. This is what I have so far.
#!/bin/bash
dialog --title "Message" --yesno "Do you want to see the system time?" 6 25
z="date +"%T""
if [ "$?" != "1" ]
then
dialog --title "message" --msgbox "$z" 6 25
else
dialog --title "Message" --msgbox "ok soo what" 6 25
fi