Last active
December 7, 2018 18:32
-
-
Save mkeneqa/3773fb57acf98a583928975f425fcb15 to your computer and use it in GitHub Desktop.
PHP Epoch unix time conversion to HRF
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//How to do proper epoch unix time conversion to Human Readable Date (HRD) in php | |
//How to do proper epoch unix time conversion to HRD in php | |
$time = 1531116000000; | |
date_default_timezone_set('America/Edmonton'); | |
echo date('r', substr($time, 0, 10)); | |
echo '<br/><br/>'; | |
echo date('D, Y-M-d', substr($time, 0, 10)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment