Created
July 9, 2019 22:17
-
-
Save BenBroide/ea272dc67bbd643fadd72957ece70c65 to your computer and use it in GitHub Desktop.
Date time from time stamp
This file contains hidden or 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 | |
// This will error and break code | |
$datetime = new DateTime( 1565301395 ); | |
var_dump( $datetime ); | |
// This will work | |
$datetime = new DateTime(); | |
$datetime->setTimestamp(1565301395); | |
var_dump( $start_date ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment