bash/for_bigg/rtcdate.sh

16 lines
305 B
Bash
Raw Normal View History

2023-02-14 18:22:28 +00:00
#!/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"
2023-03-16 12:46:53 +00:00