bash/for_bigg/rtcdate.sh
cheesus_crust 9581bcc174 lets
2023-02-14 21:22:28 +03:00

15 lines
304 B
Bash
Executable File

#!/usr/bin/env bash
midnight=$(TZ=Europe/Moscow date +"%p")
# echo $midnight
if [[ $midnight = "PM" ]]
then
# echo "PM"
rtcdate=$(TZ='Europe/Moscow' date --date='08:15 tomorrow' +"%Y%m%d%H%M%S")
else
# echo "AM"
rtcdate=$(TZ='Europe/Moscow' date --date='08:15' +"%Y%m%d%H%M%S")
fi
echo "$rtcdate"