Created
March 17, 2017 11:30
-
-
Save erlangparasu/6d305262ce0e5a04430651d9dc1a2b45 to your computer and use it in GitHub Desktop.
Generate expires date (1 day)
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
/* Generate expires date (1 day) */ | |
$timezone_identifier = 'Asia/Makassar'; | |
date_default_timezone_set($timezone_identifier); | |
$time = '1 day'; | |
$interval = DateInterval::createFromDateString($time); | |
$dt = new DateTime(); | |
$dt->add($interval); | |
$format = 'Y-m-d H:i:s'; | |
$dt_str = $dt->format($format); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment