
if [ -n "$GX_TIMEZONE" ] ; then
	echo $GX_TIMEZONE > /tmp/newtimezone
	diff /tmp/newtimezone /etc/timezone
	if [ $? -eq 0 ] ; then
		echo "time zone has not changed"
	else
		echo -n 'old time zone was:'
		cat /etc/timezone
		echo changing time zone to $GX_TIMEZONE 

		#this dones't work in 16.04
		#echo $GX_TIMEZONE > /etc/timezone
		#dpkg-reconfigure --frontend noninteractive tzdata
		#rm -f /etc/localtime 
		#cp /usr/share/zoneinfo/$GX_TIMEZONE /etc/localtime 

		# this works in 16.04
		timedatectl set-timezone $GX_TIMEZONE

		# this causes problems - instead should fix all gnc to use proper zones
		#NEWTZNAME=$(cat /etc/timezone)
		#echo -n 'proper name for new time zone is:'
		#cat /etc/timezone
		#echo 'setting new proper time zone name in groovix.conf'
		#bashconfset GX_TIMEZONE "$NEWTZNAME" /etc/groovix/groovix.conf


	fi
fi
