
Christophe Charron - 2007-10-17 20:40:24 -
In reply to message 1 from Petar
Hi,
what's the problem with this date ? It's a RFC-822 date time format !!
Here is the code I use
$vl_c_z04=$decoded[0]["Headers"]["date:"];
if (($timestamp = strtotime($vl_c_z04)) === false) {
if (strtolower(substr($vl_c_z04,-2))=="ut") {
$vl_c_z04=substr($vl_c_z04,0,strlen($vl_c_z04)-2)."UTC";
if (($timestamp = strtotime($vl_c_z04)) === false) {
$vl_c_z09="19610123060000";
} else {
$vl_c_z09=date('YmdHis', $timestamp);
}
} else {
$vl_c_z09="now()";
}
} else {
$vl_c_z09=date('YmdHis', $timestamp);
}