xxxxxxxxxx
$timestamp = 1609459200; // Example timestamp
// Convert timestamp to a string representation
$dateString = date("Y-m-d H:i:s", $timestamp);
echo $dateString; // Output: 2021-01-01 00:00:00
xxxxxxxxxx
<?php
$date = new DateTime();
echo $date->format('U = Y-m-d H:i:s') . "\n";
$date->setTimestamp(1171502725);
echo $date->format('U = Y-m-d H:i:s') . "\n";
?>
xxxxxxxxxx
<?php
echo date('m/d/Y H:i:s', 1541843467);
?>
//Output:
11/01/2022 09:51:07