
-- disabled ---

#/bin/ash
# `date` semplificato (attraverso clock)
# Somma /etc/time.conf al tempo del CMOS

# by M. Andreoli

#set -x

if [ "$1" = "-h" ] ; then
	echo "mu-date: Usage date [-h]"
	exit
fi


# Universal Time

set -- `clock -r`
pre="$1 $2"; post="$5"
day=$3
ut=$4

# Parse "time"

set -- `echo $ut | sed s/:/\ /g`
uh=$1; um=$2; us=$3

if [ -r /etc/time.conf ]; then
	corr=`cat /etc/time.conf`
else
	corr="+ 0"
fi

# add correction

h=`expr $uh  $corr`
over=`expr $h - 24`

if [ "$over" -gt 0 ] ; then
		day=`expr $day + 1`
		h=$over
fi	

# ok, print date

echo "$pre $day $h:$um:$us $post"
