пятница, 23 января 2009 г., 20:32:05 UTC+2 пользователь Brian Hall написал:
One issue happens with case of XLS file where use date in one column, and time in another.
It can be simply corrected as following:
last operator at date block:
$string = date ($format, mktime($hours, $mins, $secs, $dateinfo["mon"], $dateinfo["mday"], $dateinfo["year"]));
must be changed to (i do not use date formatting):
if ($numValue > 1) {
$string = mktime($hours, $mins, $secs, $dateinfo["mon"], $dateinfo["mday"], $dateinfo["year"]);
} else {
$string = mktime($hours, $mins, $secs, 1, 1, 70);
}
If somebody require formatting, please add date($format... in front of mktime. I do not do so because utc date and time can be added together getting real date (with time) if they are in different columns.