public static function Utils::getHttpDate

Create an RFC 1123 HTTP-Date from various date values

Parameters

string|int $date Date to convert:

Return value

string

File

drupal/core/vendor/guzzle/http/Guzzle/Http/Utils.php, line 25

Class

Utils
HTTP utility class

Namespace

Guzzle\Http

Code

public static function getHttpDate($date) {
  if (!is_numeric($date)) {
    $date = strtotime($date);
  }
  return gmdate('D, d M Y H:i:s \\G\\M\\T', $date);
}