+# ----
+
+# Set the timezone and date/time
+
+while ! timezone=$(zenity --list --title "Select your timezone" --text="Please select your timezone" --column="Select your timezone" --print-column=1 "GMT" "GMT+1" "GMT+2" "GMT+3" "GMT+4" "GMT+5" "GMT+6" "GMT+7" "GMT+8" "GMT+9" "GMT+10" "GMT+11" "GMT+12" "GMT-1" "GMT-2" "GMT-3" "GMT-4" "GMT-5" "GMT-6" "GMT-7" "GMT-8" "GMT-9" "GMT-10" "GMT-11" "GMT-12" "GMT-13" "GMT-14" "UCT" "UTC" "Universal" --width=250 --height=450) || [ "x$timezone" = "x" ] ; do
+ zenity --title="Error" --error --text="Please select a timezone." --timeout=6
+done
+
+echo $timezone
+echo rm /etc/localtime && ln -s /usr/share/zoneinfo/Etc/$timezone /etc/localtime
+
+#Make sure we clean up any leading zeros in the day (as Zenity freaks out)
+date_d=`date +%d | sed 's/^0//'`
+date_m=`date +%m`
+date_y=`date +%Y`
+
+while ! date=$(zenity --calendar --text="Please select the current date" --title "Please select the current date" --day=$date_d --month=$date_m --year=$date_y --date-format="%Y%m%d" --width=500) || [ "x$date" = "x" ] ; do
+ zenity --title="Error" --error --text="Please select the date." --timeout 6
+done
+
+echo $date
+
+time_h=`date +%H`
+time_m=`date +%M`
+
+while ! time=$(zenity --title="Enter actual time" --entry --text "Please enter the time in 24hour format (HH:MM):" --entry-text "$time_h:$time_m") || [ "x$time" = "x" ] ; do
+ zenity --title="Error" --error --text="Please input the time." --timeout 6
+done
+
+while ! date -d $time ; do
+ time=$(zenity --title="Enter actual time" --entry --text "Please enter the time in 24hour format (HH:MM):" --entry-text "$time_h:$time_m")
+done
+
+date +%Y%m%d -s $date
+date +%H:%M -s $time
+
+# ----
+
+# Finsh up and boot the system.
+
+zenity --info --title="Finished" --text "This concludes the First Boot Wizard.\n\nYour chosen interface will start in a few seconds\n\nThankyou for buying the OpenPandora. Enjoy using the device!" --timeout 6
+
+# ----
+
+# Write the control file so this script is not run on next boot
+# (hackish I know but I want the flexability to drop a new script in later esp. in the early firmwares).
+
+touch /etc/pandora/first-boot
+# Make the control file writeable by all to allow the user to delete to rerun the wizard on next boot.
+chmod 0666 /etc/pandora/first-boot
+
+# ----