Add function for converting ISO date to HTTP date.

This commit is contained in:
Andrew McMillan 2009-06-14 11:22:39 +12:00
parent 35a9d326ab
commit a264cbc9b7
2 changed files with 18 additions and 0 deletions

View File

@ -257,3 +257,12 @@ function ConstructURL( $partial_path ) {
return $url;
}
/**
* Convert a date from ISO format into the sad old HTTP format.
* @param string $isodate The date to convert
*/
function ISODateToHTTPDate( $isodate ) {
// Use strtotime since strptime is not available on Windows platform.
return( gmstrftime('%a, %d %b %Y %T GMT', strtotime($isodate)) );
}

View File

@ -257,3 +257,12 @@ function ConstructURL( $partial_path ) {
return $url;
}
/**
* Convert a date from ISO format into the sad old HTTP format.
* @param string $isodate The date to convert
*/
function ISODateToHTTPDate( $isodate ) {
// Use strtotime since strptime is not available on Windows platform.
return( gmstrftime('%a, %d %b %Y %T GMT', strtotime($isodate)) );
}