Last active
August 29, 2015 14:01
-
-
Save sokil/ed429b43a305b5432f3e to your computer and use it in GitHub Desktop.
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 | |
/** | |
* @link http://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1 | |
*/ | |
function timestampToHttpDate($timestamp) { | |
return gmdate('D, d M Y H:i:s', $timestamp) . ' GMT'; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
echo timestampToHttpDate(time());
Wed, 21 May 2014 12:26:11 GMT