US Daylight Savings Time (DST) 2007 Energy Act on Solaris

A change in Americas Daylight Savings Time will soon (11th of March 2007) be applied. From then on, the summer will be longer, which is positive.

To check you Solaris 8 system, if it is able to roll over to summertime, use this mini piece of code.

# Unset interactive if you are testing from a console,
# otherwise, use the non-interactive mode. (Interactive
# shows you the rollover by setting the timezone and
# changing the date to the critical moment. (03-11-2007@02:00)
#interactive="yes"

storeddate=$(date '+ %m%d%H%M%Y.%S')
storedtz=$(echo $TZ)
export TZ="America/Adak"
if [ $interactive ] ; then
echo "Setting time to 11 March 2007 (01:59)"
echo "You should now see the clock roll over."
date 031101592007.58 > /dev/null
counter=3
while [ $counter -gt 0 ] ; do
  sleep 1
  date
  counter=$(($counter -1))
done
export TZ="$storedtz"
date $storeddate > /dev/null
else
date | grep 'HA.T' > /dev/null
if [ $? -gt 0 ] ; then
  echo "Unable to switch timezone."
  status=$(($status+8))
fi
export TZ="$storedtz"
fi

Good luck with the code!