Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

epoch to date php

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 by www.php.net #
 
PREVIOUS NEXT
Tagged: #epoch #date #php
ADD COMMENT
Topic
Name
5+6 =