Files
svc.ems/bin/chgDate

20 lines
415 B
Bash

#!/bin/sh
#when change the date of system,
#people always forget to do "hwclock --systohc"
#But system will use the hardware clock after reboot.
#so it is necessary to do it by this script.
#By Hewd 2004-02-04
if [ $# -ne 2 ] ; then
echo "Example:"
echo "chgdate \"2004-02-15 12:00:00\""
else
date --set="$1 $2"
echo "date --set=\"$1 $2\""
echo "hwclock --systohc"
date --set="$1 $2"
hwclock --systohc
fi