>>676
bashならこっち
for (( t = stime; etime >= t; t += 60 * 60 * 24 )); do
date -d @${t} '+%Y%m%d'
done