In this article, we will learn how to subtract seconds from the current Date Time In Php?


Example

<?php
    $date = date('Y-m-d H:i:s', strtotime('-20 seconds'));
    echo $date;
?>


Output:

2021-01-26 14:00:02