Question : php start of day epoch
Answered by : jolly-jackal-m3gw0ryu4wc3
$beginOfDay = strtotime("today", $timestamp);
$endOfDay = strtotime("tomorrow", $beginOfDay) - 1;
Source : | Last Update : Tue, 22 Sep 20
Question : epoch to date php
Answered by : tim-mackenzie
date_default_timezone_set('UTC'); // set timezone
$timestamp = time(); // get current epoch time
$format = "Y-m-d h:i:sa"; // format for date output
$formatted_date = date($format,$timestamp)); // convert timestamp to format
echo($formatted_date);
Source : https://www.php.net/manual/en/function.date.php | Last Update : Tue, 26 Apr 22