|
|
@ -713,6 +713,8 @@ function format_date($date, $format=NULL)
|
|
|
|
$ts = $date;
|
|
|
|
$ts = $date;
|
|
|
|
else if (!empty($date))
|
|
|
|
else if (!empty($date))
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
// support non-standard "GMTXXXX" literal
|
|
|
|
|
|
|
|
$date = preg_replace('/GMT\s*([+-][0-9]+)/', '\\1', $date);
|
|
|
|
// if date parsing fails, we have a date in non-rfc format.
|
|
|
|
// if date parsing fails, we have a date in non-rfc format.
|
|
|
|
// remove token from the end and try again
|
|
|
|
// remove token from the end and try again
|
|
|
|
while ((($ts = @strtotime($date))===false) || ($ts < 0))
|
|
|
|
while ((($ts = @strtotime($date))===false) || ($ts < 0))
|
|
|
|