I am trying to write the code to convert the date to desired format and increase 300 seconds in every run.
Date is in form 2020-12-19 00:35:00+00:000 want it to be converted to form 2020-12-19T00:35:00Z and after every run increase add five minutes to the timestamp.
for run in $(seq 0 $REPEAT)
do
echo "======================"
VARIABLE=$( expr 300 '*' $run)
DATE=$(date --iso-8601=seconds -d "2020-19-19T00:35:00 + $VARIABLE seconds")
echo $DATE
for file in ${FILELIST[@]};
do
echo "Running fine"
done
done
But i am getting the output as:
2020-03-09T03:05:01+05:30
I want the output to be 2020-12-19T00:35:00Z then 2020-12-19T00:40:00Z and so on.