15 lines
304 B
Bash
Executable File
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"
|