#!/bin/bash
#
sudo systemsetup -setusingnetworktime off #关闭网络时间同步
echo "请输入您的时间,时间格式为 2023-01-01 01:01 " #echo "Please enter your time"
read time
echo "时间 是 $time" # echo "time is $time"
month=`echo "${time}" | cut -f2 -d-`
if [ `echo ${month} | wc -c` = 2 ];then month="0${month}" ; fi
day=`echo "${time}" | cut -f3 -d- | cut -f1 -d' '`