Commit 5241cce4 authored by tbrehm's avatar tbrehm
Browse files

Improved date parsing routine in tform library to add support for different date formats.

parent 10f83867
......@@ -620,8 +620,9 @@ class tform {
break;
case 'DATE':
if($record[$key] != '' && $record[$key] != '0000-00-00') {
list($tag,$monat,$jahr) = explode('.',$record[$key]);
$new_record[$key] = $jahr.'-'.$monat.'-'.$tag;
$date_parts = date_parse_from_format($this->dateformat,$record[$key]);
//list($tag,$monat,$jahr) = explode('.',$record[$key]);
$new_record[$key] = $date_parts['year'].'-'.$date_parts['month'].'-'.$date_parts['day'];
//$tmp = strptime($record[$key],$this->dateformat);
//$new_record[$key] = ($tmp['tm_year']+1900).'-'.($tmp['tm_mon']+1).'-'.$tmp['tm_mday'];
} else {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment