Try current time - last check-in time > 60×60×24.
This method always breaks the signature.
So if the last check-in was at 0:00 on the 1st, today is at 23:59 on the 2nd
天蓬老师2017-06-05 11:12:16
When calculating, why not just use the 0-point timestamp for calculation, (strtotime(date('Y-m-d',$time1))-strtotime(date('Y-m-d',$time2)))/(3600 *twenty four).
There is no need to do this. Each person has one record, user ID, last check-in date, and consecutive check-in dates. Determine whether there are several days between today and the last check-in date. If it is the next day, the continuous check-in date +1. If there are several days apart, Day, it will directly become 1.
ringa_lee2017-06-05 11:12:16
How about comparing the dates directly...
Although when I sign in now, it is considered a successful sign-in 18-32 hours after the last time. .
我想大声告诉你2017-06-05 11:12:16
You definitely cannot use the time seconds to confirm. For example, if your previous time was 2017-5-30, I can get the second day's time 20170531 through the date() function. Then get and set the day's time format Ymd. Determine whether two are equal