#!/bin/bash

TNOW=`date +%s`
TSTART=`date --date="$1" +%s`
let "DSEC=$TSTART-$TNOW"

echo "TNOW  : ${TNOW}"
echo "TSTART: ${TSTART}"
echo "DSEC  : ${DSEC}"

if [ "${DSEC}" -lt 0 ]
then
echo "specified start time in past"
exit 1
fi
sleep $DSEC
