check if a timestamp is older than one hour

this will check if the timestamp string is less or more than one hour old.

PHP

$timestamp = strtotime("2020-05-04 13:24:32");
if ($timestamp >= strtotime('-1 hours')) {
    // dont run
    echo "🐛 <b>Dont</b> Run Import";
  } else {
    // run import
    echo "🐛 Run Import";
  }

Other Items in php
Page Views

This page has been viewed 212 times.

Search Code
Search Code by entering your search text above.
Welcome

This is my test area for webdev. I keep a collection of code snippits here, mostly for my reference. Also if i find a good site, i usually add it here.

âĪðŸ‘Đ‍ðŸ’ŧðŸ•đ

Random Quote
Even if you fall on your face, you're still moving forward.
Victor Kiam