you need to give Argumente inside of gmmktime(). Your mistake is, understand first mktime() vs gmmktime()
. see this link.
And The workaround is simple, use gmdate() function to display dates created with gmmktime()
.
<?php
$inputDate = gmmktime(0,0,0,2,7,2012);
echo gmdate("M d Y H:i:s O", $inputDate);
// Feb 07 2012 00:00:00 +0000
?>