#!/bin/bash
starttime=$(date "+%Y-%m-%d 00:00:00" -d "-1 day")
endtime=$(date "+%Y-%m-%d 23:59:59" -d "-1 day")
echo ${time1}
starttime1=`date -d "$starttime" +%s`
endtime1=`date -d "$endtime" +%s`
echo -e "时间区间是 $starttime - $endtime"
echo -e "时间戳区间 $starttime1 - $endtime1"