Answer the question
In order to leave comments, you need to log in
How to compare date and time?
The date and time are stored in the database in this format:
2019-04-17 07:59:27
The script runs once a minute, you need to compare the time and date (just in case) if 1 hour and 30 minutes have passed, I will do some action, otherwise break;
date('Y-m-d h:i:s') // вот так записывается дата и время в БД.
Answer the question
In order to leave comments, you need to log in
$date = new \DateTime('2019-04-17 07:59:27');
if ($date < (new \DateTime('-1 hour -30 minutes'))) {
// действие, если прошло больше 1 часа 30 минут
}
As I understand it, the best option is to choose some BaaS,
baas is good for some small applications, all applications from medium ones clearly require their own backend.
for the backend there is a solution from the same google,
but it’s easier in google and search
https://www.google.ru/webhp?sourceid=chrome-instan...
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question